I cannot find a way to reliably save and load a BinaryRelevance
model from the scikit-multilearn
library. I am using the Keras
wrapper to be able to use a custom classifier.
I have tried to pickle the model, but I get the error AttributeError: Can't pickle local object 'Keras.fit.<locals>.<lambda>'
. I have also tried to save the parameters obtained through model.get_params()
, but setting these parameters to a new BinaryRelevance
object through model.set_params()
does not set attributes for the BinaryRelevance
object (such as the classifiers_
attribute), meaning that it can't be used as intended. Is there any way around this?