|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.evaluation.MarginCurve
Generates points illustrating the prediction margin. The margin is defined as the difference between the probability predicted for the actual class and the highest probability predicted for the other classes. One hypothesis as to the good performance of boosting algorithms is that they increaes the margins on the training data and this gives better performance on test data.
Constructor Summary | |
MarginCurve()
|
Method Summary | |
Instances |
getCurve(FastVector predictions)
Calculates the cumulative margin distribution for the set of predictions, returning the result as a set of Instances. |
private double[] |
getMargins(FastVector predictions)
Pulls all the margin values out of a vector of NominalPredictions. |
static void |
main(java.lang.String[] args)
Tests the MarginCurve generation from the command line. |
private Instances |
makeHeader()
Creates an Instances object with the attributes we will be calculating. |
private Instance |
makeInstance(double margin,
int current,
int cumulative)
Creates an Instance object with the attributes calculated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MarginCurve()
Method Detail |
public Instances getCurve(FastVector predictions)
private double[] getMargins(FastVector predictions)
predictions
- a FastVector containing NominalPredictions
private Instances makeHeader()
private Instance makeInstance(double margin, int current, int cumulative)
margin
- the margin for this data point.current
- the number of instances with this margin.cumulative
- the number of instances with margin less than or equal
to this margin.
public static void main(java.lang.String[] args)
args
- currently ignored
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |