Interface Regression<T>

Type Parameters:
T - the data type of model input objects.
All Superinterfaces:
Serializable, ToDoubleFunction<T>
All Known Subinterfaces:
DataFrameRegression
All Known Implementing Classes:
GaussianProcessRegression, GradientTreeBoost, KernelMachine, LinearModel, MLP, RandomForest, RBFNetwork, RegressionTree

public interface Regression<T> extends ToDoubleFunction<T>, Serializable
Regression analysis includes any techniques for modeling and analyzing the relationship between a dependent variable and one or more independent variables. Most commonly, regression analysis estimates the conditional expectation of the dependent variable given the independent variables. Regression analysis is widely used for prediction and forecasting, where its use has substantial overlap with the field of machine learning.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The regression trainer.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
     
    static <T> Regression<T>
    ensemble(Regression<T>... models)
    Return an ensemble of multiple base models to obtain better predictive performance.
    default boolean
    Returns true if this is an online learner.
    default double[]
    Predicts the dependent variable of a list of instances.
    default double[]
    Predicts the dependent variable of a dataset.
    double
    Predicts the dependent variable of an instance.
    default double[]
    predict(T[] x)
    Predicts the dependent variable of an array of instances.
    default void
    Updates the model with a mini-batch of new samples.
    default void
    update(T[] x, double[] y)
    Updates the model with a mini-batch of new samples.
    default void
    update(T x, double y)
    Online update the classifier with a new training instance.
  • Method Details

    • predict

      double predict(T x)
      Predicts the dependent variable of an instance.
      Parameters:
      x - an instance.
      Returns:
      the predicted value of dependent variable.
    • applyAsDouble

      default double applyAsDouble(T x)
      Specified by:
      applyAsDouble in interface ToDoubleFunction<T>
    • predict

      default double[] predict(T[] x)
      Predicts the dependent variable of an array of instances.
      Parameters:
      x - the instances.
      Returns:
      the predicted values.
    • predict

      default double[] predict(List<T> x)
      Predicts the dependent variable of a list of instances.
      Parameters:
      x - the instances to be classified.
      Returns:
      the predicted class labels.
    • predict

      default double[] predict(Dataset<T,?> x)
      Predicts the dependent variable of a dataset.
      Parameters:
      x - the dataset to be classified.
      Returns:
      the predicted class labels.
    • online

      default boolean online()
      Returns true if this is an online learner.
      Returns:
      true if online learner.
    • update

      default void update(T x, double y)
      Online update the classifier with a new training instance. In general, this method may be NOT multi-thread safe.
      Parameters:
      x - the training instance.
      y - the response variable.
    • update

      default void update(T[] x, double[] y)
      Updates the model with a mini-batch of new samples.
      Parameters:
      x - the training instances.
      y - the response variables.
    • update

      default void update(Dataset<T,Double> batch)
      Updates the model with a mini-batch of new samples.
      Parameters:
      batch - the training instances.
    • ensemble

      @SafeVarargs static <T> Regression<T> ensemble(Regression<T>... models)
      Return an ensemble of multiple base models to obtain better predictive performance.
      Type Parameters:
      T - the type of model input object.
      Parameters:
      models - the base models.
      Returns:
      the ensemble model.