Class SkeletalIndependentRegressionModel

java.lang.Object
org.tribuo.Model<Regressor>
org.tribuo.regression.impl.SkeletalIndependentRegressionModel
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.Provenancable<ModelProvenance>, Serializable

public abstract class SkeletalIndependentRegressionModel extends Model<Regressor>
A Model which wraps n independent regression models, where n is the size of the MultipleRegressor domain. Each model independently predicts a single regression dimension.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • predict

      Description copied from class: Model
      Uses the model to predict the output for a single example.

      predict does not mutate the example.

      Throws IllegalArgumentException if the example has no features or no feature overlap with the model.

      Specified by:
      predict in class Model<Regressor>
      Parameters:
      example - the example to predict.
      Returns:
      the result of the prediction.
    • createFeatures

      Creates the feature vector. Does not include a bias term.

      Designed to be overridden.

      Parameters:
      example - The example to convert.
      Returns:
      The feature vector.
    • scoreDimension

      protected abstract Regressor.DimensionTuple scoreDimension(int dimensionIdx, SparseVector features)
      Makes a prediction for a single dimension.
      Parameters:
      dimensionIdx - The dimension index to predict.
      features - The features to use.
      Returns:
      A single dimension prediction.