python - AttributeError: probability estimates are not available for loss='hinge' -
text_clf = pipeline([('vect',countvectorizer(decode_error='ignore')), ('tfidf',tfidftransformer()), ('clf',sgdclassifier(loss = 'hinge',penalty = 'elasticnet',alpha = 1e-3,n_iter = 10, random_state = 40))]) text_clf = text_clf.fit(traindocs+valdocs,np.array(trainlabels+vallabels)) predicted = text_clf.predict_proba(testdocs)
how can predicted probability of every test sample? thanks!
Comments
Post a Comment