using "OneVsRestClassifier" from sklearn in Python to tune a customized binary classification into a multi-class classification I have binary classification method name Fclassifier I need to apply it in a multi-class classification problem, this classifier doesn't have any decision_function (or predict_proba) and its core only accept {1,-1} as class labels! I am trying to use OneVsRestClassifier multi-classifier from sklearn so that I can tune the Fclassifier into multi-class classifier:

fm = FClassification(n_iter=1000, init_stdev=0.1, rank=2, random_state=123,l2_reg_w=0, l2_reg_V=0, l2_reg=0, step_size=0.1)
OneVsRestClassifier(fm).fit(X_train,y_train)


but I am facing the following error:


  RuntimeError: Cannot clone object FClassification(init_stdev=0.1,
  l2_reg=None, l2_reg_V=0, l2_reg_w=0,
           n_iter=1000, random_state=123, rank=2, step_size=0.1), as the constructor does not seem to set parameter l2_reg_V


do you think if it is the problem of Fclassifier that can not satisfy the expectation of OneVsRestClassifier and if I should define a customized predict_proba which can fit my data to the classifier in order to solve the problem? or if the error may have other reasons and solutions?
Hi you need to implement get_params method to export all your hyper-parameters or inherit your classifier from sklearn.base.BaseEstimator since under hood of OneVsRestClassifier, every classifier is being distributed. so your classifier is being cloned.