All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.evaluation.CostCurve

java.lang.Object
    |
    +----weka.classifiers.evaluation.CostCurve

public class CostCurve
extends java.lang.Object
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: 1.2 $
Author:
Mark Hall (mhall@cs.waikato.ac.nz)

Variable Index

 o NORM_EXPECTED_COST_NAME
 
 o PROB_COST_FUNC_NAME
 
 o RELATION_NAME
The name of the relation used in cost curve datasets
 o THRESHOLD_NAME
 

Constructor Index

 o CostCurve()
 

Method Index

 o getCurve(FastVector)
Calculates the performance stats for the default class and return results as a set of Instances.
 o getCurve(FastVector, int)
Calculates the performance stats for the desired class and return results as a set of Instances.
 o main(String[])
Tests the CostCurve generation from the command line.

Field Detail

 o RELATION_NAME
public static final java.lang.String RELATION_NAME
          The name of the relation used in cost curve datasets
 o PROB_COST_FUNC_NAME
public static final java.lang.String PROB_COST_FUNC_NAME
 o NORM_EXPECTED_COST_NAME
public static final java.lang.String NORM_EXPECTED_COST_NAME
 o THRESHOLD_NAME
public static final java.lang.String THRESHOLD_NAME

Constructor Detail

 o CostCurve
public CostCurve()

Method Detail

 o getCurve
public Instances getCurve(FastVector predictions)
          Calculates the performance stats for the default class and return results as a set of Instances. The structure of these Instances is as follows:

Parameters:
classIndex - index of the class of interest.
Returns:
datapoints as a set of instances, null if no predictions have been made.
See Also:
TwoClassStats
 o getCurve
public Instances getCurve(FastVector predictions,
                          int classIndex)
          Calculates the performance stats for the desired class and return results as a set of Instances.
Parameters:
classIndex - index of the class of interest.
Returns:
datapoints as a set of instances.
 o main
public static void main(java.lang.String args[])
          Tests the CostCurve generation from the command line. The classifier is currently hardcoded. Pipe in an arff file.
Parameters:
args - currently ignored

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home