Class SkeletalIndependentRegressionSparseModel
java.lang.Object
org.tribuo.Model<Regressor>
org.tribuo.SparseModel<Regressor>
org.tribuo.regression.impl.SkeletalIndependentRegressionSparseModel
- All Implemented Interfaces:
- com.oracle.labs.mlrg.olcut.provenance.Provenancable<ModelProvenance>,- Serializable
- Direct Known Subclasses:
- SparseLinearModel
A 
SparseModel 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 SummaryFieldsFields inherited from class org.tribuo.ModelALL_OUTPUTS, BIAS_FEATURE, featureIDMap, generatesProbabilities, name, outputIDInfo, provenance, provenanceOutput
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedSkeletalIndependentRegressionSparseModel(String name, String[] dimensions, ModelProvenance modelProvenance, ImmutableFeatureMap featureMap, ImmutableOutputInfo<Regressor> outputInfo, Map<String, List<String>> activeFeatures) models.size() must equal labelInfo.getDomain().size()
- 
Method SummaryModifier and TypeMethodDescriptionprotected SparseVectorcreateFeatures(Example<Regressor> example) Creates the feature vector.Uses the model to predict the output for a single example.protected abstract Regressor.DimensionTuplescoreDimension(int dimensionIdx, SparseVector features) Makes a prediction for a single dimension.Methods inherited from class org.tribuo.SparseModelcopy, getActiveFeaturesMethods inherited from class org.tribuo.ModelcastModel, copy, generatesProbabilities, getExcuse, getExcuses, getFeatureIDMap, getName, getOutputIDInfo, getProvenance, getTopFeatures, innerPredict, predict, predict, setName, toString, validate
- 
Field Details- 
dimensions
 
- 
- 
Constructor Details- 
SkeletalIndependentRegressionSparseModelprotected SkeletalIndependentRegressionSparseModel(String name, String[] dimensions, ModelProvenance modelProvenance, ImmutableFeatureMap featureMap, ImmutableOutputInfo<Regressor> outputInfo, Map<String, List<String>> activeFeatures) models.size() must equal labelInfo.getDomain().size()- Parameters:
- name- Model name.
- dimensions- Dimension names.
- modelProvenance- The model provenance.
- featureMap- The feature domain used in training.
- outputInfo- The output domain used in training.
- activeFeatures- The active features in this model.
 
 
- 
- 
Method Details- 
predictDescription copied from class:ModelUses the model to predict the output for a single example.predict does not mutate the example. Throws IllegalArgumentExceptionif the example has no features or no feature overlap with the model.
- 
createFeaturesCreates the feature vector. Does not include a bias term.Designed to be overridden, called by the predict method. - Parameters:
- example- The example to convert.
- Returns:
- The feature vector.
 
- 
scoreDimensionMakes a prediction for a single dimension.- Parameters:
- dimensionIdx- The dimension index to predict.
- features- The features to use.
- Returns:
- A single dimension prediction.
 
 
-