javax.datamining.supervised.classification
Interface ClassificationTestMetricsTask

All Superinterfaces:
MiningObject, Task, TestMetricsTask

public interface ClassificationTestMetricsTask
extends TestMetricsTask

ClassificationTestMetricsTask is a mining task used for computing and creating test metrics objects given an apply output data. The result of executing a classification test metrics task is a ClassificationTestMetrics object.

Executing a ClassificationTestMetricsTask task without any metrics to be computed results in an exception.

Author:
JSR-73 Java Data Mining Expert Group
See Also:
MiningObject, Task, TestMetricsTask

Method Summary
 boolean computeMetric(ClassificationTestMetricOption testMetric)
          Returns true if the test metric is to be computed, false otherwise.
 void computeMetric(ClassificationTestMetricOption testMetric, boolean flag)
          Indicates which metric(s) to compute as indicated by the testMetric and corresponding flag.
 java.lang.String getCostMatrixName()
          Returns the name of the cost matrix to be used for test metrics computation.
 int getNumberOfLiftQuantiles()
          Returns the number of quantiles for lift computation.
 java.lang.Object getPositiveTargetValue()
          Returns the positive target value for lift computation.
 void setCostMatrixName(java.lang.String costMatrixName)
          Sets the name of the cost matrix to be used optionally for test metrics computation.
 void setNumberOfLiftQuantiles(int numberOfQuantiles)
          Sets the number of quantiles for lift computation.
 void setPositiveTargetValue(java.lang.Object positiveTargetValue)
          Sets the positive target value for lift computation.
 
Methods inherited from interface javax.datamining.supervised.TestMetricsTask
getActualTargetAttrName, getApplyOutputDataName, getPredictedTargetAttrName, getPredictionRankingAttrName, getTestMetricsName, setActualTargetAttrName, setApplyOutputDataName, setPredictedTargetAttrName, setPredictionRankingAttrName, setTestMetricsName, verify
 
Methods inherited from interface javax.datamining.base.Task
getExecutionHandle
 
Methods inherited from interface javax.datamining.MiningObject
getCreationDate, getCreatorInfo, getDescription, getName, getObjectIdentifier, getObjectType, setDescription
 

Method Detail

computeMetric

public boolean computeMetric(ClassificationTestMetricOption testMetric)
Returns true if the test metric is to be computed, false otherwise.

Parameters:
testMetric -
Returns:
boolean

computeMetric

public void computeMetric(ClassificationTestMetricOption testMetric,
                          boolean flag)
Indicates which metric(s) to compute as indicated by the testMetric and corresponding flag. If flag is true, the metric is computed. If false, it is not computed. The default is true for confusion matrix, and false for the others. The method is idempotent for the same parameters. It may be invoked multiple times to compute more than one test metric. At least one test metrics object must be enabled.

Parameters:
testMetric -
flag -
Returns:
void

getCostMatrixName

public java.lang.String getCostMatrixName()
Returns the name of the cost matrix to be used for test metrics computation. Returns null if no cost matrix has been set via setCostMatrixName method.

Returns:
String

getNumberOfLiftQuantiles

public int getNumberOfLiftQuantiles()
Returns the number of quantiles for lift computation. Return 0 if lift computation is disabled.

Returns:
int

getPositiveTargetValue

public java.lang.Object getPositiveTargetValue()
Returns the positive target value for lift computation.

Returns:
Object

setCostMatrixName

public void setCostMatrixName(java.lang.String costMatrixName)
                       throws JDMException
Sets the name of the cost matrix to be used optionally for test metrics computation.

Parameters:
costMatrixName -
Returns:
void
Throws:
JDMException

setNumberOfLiftQuantiles

public void setNumberOfLiftQuantiles(int numberOfQuantiles)
Sets the number of quantiles for lift computation. The number must be a positive integer.

Parameters:
numberOfQuantiles - The number of quantiles for lift computation.
Returns:
void

setPositiveTargetValue

public void setPositiveTargetValue(java.lang.Object positiveTargetValue)
Sets the positive target value for lift computation.

Parameters:
positiveTargetValue - The positive target value for lift computation.
Returns:
void