« Return to Thread: Getting class probabilities w/ SMO

Re: Getting class probabilities w/ SMO

by prog_lady :: Rate this Message:

Reply to Author | View in Thread

I used this command
 java weka.classifiers.functions.SMO -l model.model -T data.arff -c first -p 0 -distribution
and got the output below, i thought the prediction and distribution would be somewhere
between 0 and 1 not 1 itself? I am attaching my training and test files if someone wouldn't
mind looking at them :)  I am wanting to get the probability of a test instance
being positive or negative so that I can classify a sentence as being not only positive or negative
but the probability of being positive or negative...
movie_review_630.arff
testFile8001.arff
....
Logistic Regression with ridge parameter of 1.0E-8
Coefficients...
                Class
Variable          neg
=====================
pred         -95.7603
Intercept   -101.5845


Odds Ratios...
                Class
Variable          neg
=====================
pred                0





=== Error on test data ===

Correctly Classified Instances           0                0      %
Incorrectly Classified Instances         1              100      %
Kappa statistic                          0    
Mean absolute error                      1    
Root mean squared error                  1    
Total Number of Instances                1    


=== Confusion Matrix ===

 a b   <-- classified as
 0 1 | a = neg
 0 0 | b = pos


=== Predictions on test data ===

 inst#     actual  predicted error distribution
     1      1:neg      2:pos   +   0,*1

Mark Hall-9 wrote:
On 2/7/09 10:36 AM, prog_lady wrote:
> Hi Mark,
>   The command I'm using to test the data is...
> java weka.classifiers.functions.SMO -l model.model T  data.arff -c first -p
> 0

You don't need to add the -M option again. You will need to add the
-distribution option (in conjunction with -p) to get the probability
distributions output.

Cheers,
Mark.

--
Mark Hall
Senior Developer/Consultant, Pentaho Open Source Business Intelligence
Citadel International, Suite 340, 5950 Hazeltine National Dr., Orlando, FL
32822, USA
+64 7 847-3537 office, +64 21 399-132 mobile, +1 815 550-8637 fax,
Skype: mark.andrew.hall, Yahoo: mark_andrew_hall
Download the latest release today <http://www.sourceforge.net/projects/pentaho>


_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

 « Return to Thread: Getting class probabilities w/ SMO