Class RegressionMetric

java.lang.Object
planner.utils.evaluators.regrmetrics.RegressionMetric
All Implemented Interfaces:
Evaluator
Direct Known Subclasses:
MAE, MAPE, MRAE, MSE, MSPE, RAE, RMSE, RMSLE, RMSPE, SSE

public abstract class RegressionMetric extends Object implements Evaluator
RegressionMetric is an abstract class for representing the regression metrics used when training with datasets, can be also considerated as evaluators of the genotype of the individuals.
Since:
1.0
Version:
1.0
Author:
Alicia Vazquez Ramos
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Execution
    Configuration of the current execution.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract double
    compute(double[] real, double[] estimation)
    Computes the error between the real value (stored in dataset instances) and the estimation made by the executed algorithm.
    double
    evaluate(double[] genotype)
    Evaluates the genotype given with a concrete configured RegressionMetric and the configured dataset for the current execution.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • exe

      protected final Execution exe
      Configuration of the current execution.
  • Constructor Details

    • RegressionMetric

      public RegressionMetric(Execution exe)
      Constructor.
      Parameters:
      exe - configuration of the current execution.
  • Method Details

    • compute

      public abstract double compute(double[] real, double[] estimation)
      Computes the error between the real value (stored in dataset instances) and the estimation made by the executed algorithm.
      Parameters:
      real - real value for a given instance of the dataset.
      estimation - prediction of the objective function used.
      Returns:
      error of the estimation.
    • evaluate

      public double evaluate(double[] genotype)
      Evaluates the genotype given with a concrete configured RegressionMetric and the configured dataset for the current execution.
      Specified by:
      evaluate in interface Evaluator
      Parameters:
      genotype - candidate solution.
      Returns:
      fitness of the given genotype to the problem.