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

Popular posts from this blog

How to use SUM() in MySQL for calculated values -

ios - IBOutlet for image button not correctly referencing button after recreating outlet -

java - AEM: 403 Forbidden occurs when call a Post servlet -