Class SimpleCriterion

java.lang.Object
adaa.analytics.rules.logic.performance.AbstractPerformanceCounter
adaa.analytics.rules.logic.performance.SimpleCriterion

public class SimpleCriterion extends AbstractPerformanceCounter
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 Details

  • 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

      public PerformanceResult countExample(IExampleSet eset)
      Description copied from class: AbstractPerformanceCounter
      Counts a single example, e.g. by summing up errors.
      Specified by:
      countExample in class AbstractPerformanceCounter