hi, proba calibration with libsvm (using Platt's method) involves data resampling. So between runs the result can change.
HTH Alex On Thu, Jun 26, 2014 at 12:51 AM, Stelios <[email protected]> wrote: > Hello all, > > I have the following code: > > . . . . > # 'train' is a (M,N) numpy array (input) and 'traint' is a (M,) numpy array > (target/label) > > clf = SVC(kernel="rbf", C=1.74, gamma=0.0023, probability=True) > clf.fit(train, traint) > print clf.classes_ # Ensure our classes are [0,1] > t1 = clf.predict_proba(matrix) > t2 = clf.predict(matrix) > print 'probabilities: ', t1 > print 'class: ' , t2 > #repeating for various matrices.. > . . . . > > I suppose that t2 must be 0 when probability for the 1st class is bigger, > else 1 > However the two results (t1,t2) are inconsistent > results: > > [0 1] > > probabilities: [[ 0.2629873 0.7370127]] > class: [0] > > probabilities: [[ 0.22160846 0.77839154]] > class: [0] > > probabilities: [[ 0.17936026 0.82063974]] > class: [1] > > probabilities: [[ 0.28899413 0.71100587]] > class: [0] > > probabilities: [[ 0.17035052 0.82964948]] > class: [1] > > > 3rd and 5th examples agree, but the rest? > > Any idea what's going on? > > Thanks for your time > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Scikit-learn-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general > ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
