InputType
- The type of the input to the evaluator to compute the
performance of.DataType
- The type of the target and estimate values.public class MeanZeroOneErrorEvaluator<InputType,DataType> extends AbstractSupervisedCostFunction<InputType,DataType>
MeanZeroOneErrorEvaluator
class implements a method for
computing the performance of a supervised learner by the mean number of
incorrect values between the target and estimated outputs. This can also be
referred to as the error rate. The term "mean zero-one error" comes from the
computation that the error is zero if the two values are equal and one if
the two values are not equal.
This class can be used with any data type that has a valid equals method.Constructor and Description |
---|
MeanZeroOneErrorEvaluator()
Creates a new instance of MeanZeroOneErrorEvaluator.
|
Modifier and Type | Method and Description |
---|---|
static <DataType> double |
compute(java.util.Collection<? extends TargetEstimatePair<? extends DataType,? extends DataType>> data)
Computes the mean zero-one loss for the given pairs of values.
|
java.lang.Double |
evaluatePerformance(java.util.Collection<? extends TargetEstimatePair<? extends DataType,? extends DataType>> data)
Evaluates the performance accuracy of the given estimates against the
given targets.
|
clone, evaluate, getCostParameters, setCostParameters, summarize
evaluatePerformance
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluatePerformance
public MeanZeroOneErrorEvaluator()
public java.lang.Double evaluatePerformance(java.util.Collection<? extends TargetEstimatePair<? extends DataType,? extends DataType>> data)
evaluatePerformance
in interface SupervisedPerformanceEvaluator<InputType,DataType,DataType,java.lang.Double>
evaluatePerformance
in class AbstractSupervisedCostFunction<InputType,DataType>
data
- The target-estimate pairs to use to evaluate performance.public static <DataType> double compute(java.util.Collection<? extends TargetEstimatePair<? extends DataType,? extends DataType>> data)
DataType
- The type of data to compute the estimate over.data
- The data to compute the error for.