Greetings Guys, I came through the contributed implementation to multiclass.py in Scikit-learn. I just have a suggestion for you to consider the case when only one testing sample is passed to decision_function "Decision function for the OneVsOneClassifier". As for the current implementation, an undesirable output comes since n_samples = X.shape[0] will take a number larger than one when X is only a single list vector with some values. I may suggest you check the shape of X before parsing it in a particular way, or update the documentation to advise the user on a suggested way to get the prediction for one testing sample.
In a sense, it is true to say that usually, there is a testing set of many samples but in a specific case of mine, it was preferable to predict sample by sample. I overcome this by using X[0:1,:] instead of X[0,:] where X is a testing set of several samples. Regards, Othman Soufan
------------------------------------------------------------------------------
_______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general