Let’s assume c is the index of the class label associated with an instance. Let p(j) be the classifier’s estimated class probability for the class label with index j. Then WEKA’s GUI’s and evaluation methods define the margin as p(c) - max_{j != c} p(j).

In the best case, the margin is 1 because the estimated probability for the actually observed class label p(c) is 1 and all other probabilities are 0. In the worst case, the margin is -1. This happens when probability 1 is associated with an incorrect class label.

If you output the full estimated class probability distribution for each test instance when specifying output of predictions under “More options…” in the Classify Panel, you will be able to compute the margin for each test instance yourself.

Another place where the margin is used in the GUI is when you output the cumulative margin distribution by selecting “Visualize margin curve” from the pop-up menu that can be triggered by right-clicking in the Result list of the Classify Panel.

Note that there are other definitions of the term margin in the literature. WEKA’s way of defining the margin in terms of estimated probabilities is just one option.

Cheers,

Eibe

_______________________________________________

Wekalist mailing list --

[hidden email]
Send posts to: To unsubscribe send an email to

[hidden email]
To subscribe, unsubscribe, etc., visit

https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nzList etiquette:

http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html