Package weka.classifiers.evaluation
Class CostCurve
java.lang.Object
weka.classifiers.evaluation.CostCurve
- All Implemented Interfaces:
RevisionHandler
Generates points illustrating probablity cost tradeoffs that can be obtained
by varying the threshold value between classes. For example, the typical
threshold value of 0.5 means the predicted probability of "positive" must be
higher than 0.5 for the instance to be predicted as "positive".
- Version:
- $Revision: 15751 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCurve
(ArrayList<Prediction> predictions) Calculates the performance stats for the default class and return results as a set of Instances.getCurve
(ArrayList<Prediction> predictions, int classIndex) Calculates the performance stats for the desired class and return results as a set of Instances.Returns the revision string.
-
Field Details
-
RELATION_NAME
The name of the relation used in cost curve datasets- See Also:
-
PROB_COST_FUNC_NAME
attribute name: Probability Cost Function- See Also:
-
NORM_EXPECTED_COST_NAME
attribute name: Normalized Expected Cost- See Also:
-
THRESHOLD_NAME
attribute name: Threshold- See Also:
-
-
Constructor Details
-
CostCurve
public CostCurve()
-
-
Method Details
-
getCurve
Calculates the performance stats for the default class and return results as a set of Instances. The structure of these Instances is as follows:- Probability Cost Function
- Normalized Expected Cost
- Threshold contains the probability threshold that gives rise to the previous performance values.
- Parameters:
predictions
- the predictions to base the curve on- Returns:
- datapoints as a set of instances, null if no predictions have been made.
- See Also:
-
getCurve
Calculates the performance stats for the desired class and return results as a set of Instances.- Parameters:
predictions
- the predictions to base the curve onclassIndex
- index of the class of interest.- Returns:
- datapoints as a set of instances.
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-