tmadl / semisup-learn

Semi-supervised learning frameworks for python, which allow fitting scikit-learn classifiers to partially labeled data
MIT License
501 stars 153 forks source link

SelfLearningModel with basemodels having no predict_proba method #4

Open gh-owestesson opened 7 years ago

gh-owestesson commented 7 years ago

It seems like

self.plattlr.predict_proba

Is called (line 63, within self.predict_proba) before self.plattlr is set on line 78.

This causes models like a generic SVC to fail:

AttributeError: 'SelfLearningModel' object has no attribute 'plattlr'

kktsubota commented 7 years ago

if you use SVC, you only have to do is use probability=True as an argument, like SVC(..., probability=True). see this document: http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html