public abstract class SkeletalIndependentRegressionModel extends Model<Regressor>
Model
which wraps n independent regression models, where n is the
size of the MultipleRegressor domain. Each model independently predicts
a single regression dimension.Modifier and Type | Field and Description |
---|---|
protected String[] |
dimensions |
ALL_OUTPUTS, BIAS_FEATURE, featureIDMap, generatesProbabilities, name, outputIDInfo, provenance, provenanceOutput
Modifier | Constructor and Description |
---|---|
protected |
SkeletalIndependentRegressionModel(String name,
String[] dimensions,
ModelProvenance modelProvenance,
ImmutableFeatureMap featureMap,
ImmutableOutputInfo<Regressor> outputInfo)
models.size() must equal labelInfo.getDomain().size()
|
Modifier and Type | Method and Description |
---|---|
protected SparseVector |
createFeatures(Example<Regressor> example)
Creates the feature vector.
|
Prediction<Regressor> |
predict(Example<Regressor> example)
Uses the model to predict the output for a single example.
|
protected abstract Regressor.DimensionTuple |
scoreDimension(int dimensionIdx,
SparseVector features)
Makes a prediction for a single dimension.
|
copy, copy, generatesProbabilities, getExcuse, getExcuses, getFeatureIDMap, getName, getOutputIDInfo, getProvenance, getTopFeatures, innerPredict, predict, predict, setName, toString, validate
protected final String[] dimensions
protected SkeletalIndependentRegressionModel(String name, String[] dimensions, ModelProvenance modelProvenance, ImmutableFeatureMap featureMap, ImmutableOutputInfo<Regressor> outputInfo)
name
- Model name.dimensions
- Dimension names.modelProvenance
- The model provenance.featureMap
- The feature domain used in training.outputInfo
- The output domain used in training.public Prediction<Regressor> predict(Example<Regressor> example)
Model
predict does not mutate the example.
Throws IllegalArgumentException
if the example has no features
or no feature overlap with the model.
protected SparseVector createFeatures(Example<Regressor> example)
Designed to be overridden.
example
- The example to convert.protected abstract Regressor.DimensionTuple scoreDimension(int dimensionIdx, SparseVector features)
dimensionIdx
- The dimension index to predict.features
- The features to use.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.