Class SimpleCriterion
java.lang.Object
adaa.analytics.rules.logic.performance.AbstractPerformanceCounter
adaa.analytics.rules.logic.performance.SimpleCriterion
Simple criteria are those which error can be counted for each example and can be averaged by the
number of examples. Since errors should be minimized, the fitness is calculated as -1 multiplied
by the the error. Subclasses might also want to implement the method
transform(double)
which applies a transformation on the value sum divided by the
number of counted examples. This is for example usefull in case of root_means_squared error. All
subclasses can be used for both regression and classification problems. In case of classification
the confidence value for the desired true label is used as prediction.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
countExample
(double label, double predictedLabel) Subclasses must count the example and return the value to sum up.countExample
(IExampleSet eset) Counts a single example, e.g.protected double
transform
(double value) Simply returns the given value.
-
Field Details
-
ABSOLUTE_ERROR
public static final int ABSOLUTE_ERROR- See Also:
-
LENIENT_RELATIVE_ERROR
public static final int LENIENT_RELATIVE_ERROR- See Also:
-
RELATIVE_ERROR
public static final int RELATIVE_ERROR- See Also:
-
ROOT_MEAN_SQUARED_ERROR
public static final int ROOT_MEAN_SQUARED_ERROR- See Also:
-
SQUARED_ERROR
public static final int SQUARED_ERROR- See Also:
-
STRICT_RELATIVE_ERROR
public static final int STRICT_RELATIVE_ERROR- See Also:
-
-
Constructor Details
-
SimpleCriterion
public SimpleCriterion(int type)
-
-
Method Details
-
countExample
protected double countExample(double label, double predictedLabel) Subclasses must count the example and return the value to sum up. -
transform
protected double transform(double value) Simply returns the given value. Subclasses might apply a transformation on the error sum divided by the number of examples. -
countExample
Description copied from class:AbstractPerformanceCounter
Counts a single example, e.g. by summing up errors.- Specified by:
countExample
in classAbstractPerformanceCounter
-