Predicting probability

后端 未结 2 572
猫巷女王i
猫巷女王i 2021-01-07 00:42

Trying to use SVC from sklearn to do a classification problem. Given a bunch of data, and information telling me whether some subject is in a certa

2条回答
  •  不要未来只要你来
    2021-01-07 00:59

    Always set the parameters before fit.

    from sklearn.svm import SVC
    clf=SVC(probability=True)
    clf=clf.fit(X,Y)
    print clf.predict_proba(W)
    

提交回复
热议问题