Class RegressionMetric

java.lang.Object
org.tribuo.regression.evaluation.RegressionMetric
All Implemented Interfaces:
EvaluationMetric<Regressor, org.tribuo.regression.evaluation.RegressionMetric.Context>

public class RegressionMetric extends Object implements EvaluationMetric<Regressor, org.tribuo.regression.evaluation.RegressionMetric.Context>
A EvaluationMetric for Regressors which calculates the metric based on a the true values and the predicted values.
  • Constructor Details

    • RegressionMetric

      public RegressionMetric(MetricTarget<Regressor> tgt, String name, ToDoubleBiFunction<MetricTarget<Regressor>, org.tribuo.regression.evaluation.RegressionMetric.Context> impl)
      Construct a new RegressionMetric for the supplied metric target, using the supplied function. This does not use example weights.
      Parameters:
      tgt - The metric target.
      name - The name of the metric.
      impl - The implementing function.
    • RegressionMetric

      public RegressionMetric(MetricTarget<Regressor> tgt, String name, ToDoubleBiFunction<MetricTarget<Regressor>, org.tribuo.regression.evaluation.RegressionMetric.Context> impl, boolean useExampleWeights)
      Construct a new RegressionMetric for the supplied metric target, using the supplied function.
      Parameters:
      tgt - The metric target.
      name - The name of the metric.
      impl - The implementing function.
      useExampleWeights - If true then the example weights are used to scale the example importance.
  • Method Details