Package org.tribuo.regression.rtree
Class IndependentRegressionTreeModel
java.lang.Object
org.tribuo.Model<T>
org.tribuo.SparseModel<T>
org.tribuo.common.tree.TreeModel<Regressor>
org.tribuo.regression.rtree.IndependentRegressionTreeModel
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.Provenancable<org.tribuo.provenance.ModelProvenance>,Serializable,org.tribuo.protos.ProtoSerializable<org.tribuo.protos.core.ModelProto>
A
Model wrapped around a list of decision tree root Nodes used
to generate independent predictions for each dimension in a regression.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intProtobuf serialization version.Fields inherited from class org.tribuo.Model
ALL_OUTPUTS, BIAS_FEATUREFields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER -
Method Summary
Modifier and TypeMethodDescriptiondeserializeFromProto(int version, String className, com.google.protobuf.Any message) Deserialization factory.intgetDepth()Probes the trees to find the depth.getRoot()Returns null, as this model contains multiple roots, one per regression output dimension.getRoots()Returns an unmodifiable view on the root node collection.getTopFeatures(int n) org.tribuo.Prediction<Regressor>org.tribuo.protos.core.ModelPrototoString()Methods inherited from class org.tribuo.common.tree.TreeModel
countNodesMethods inherited from class org.tribuo.SparseModel
copy, getActiveFeaturesMethods inherited from class org.tribuo.Model
castModel, deserialize, deserializeFromFile, deserializeFromStream, generatesProbabilities, getExcuses, getFeatureIDMap, getName, getOutputIDInfo, getProvenance, predict, predict, serializeToFile, serializeToStream, setName, validate
-
Field Details
-
CURRENT_VERSION
Protobuf serialization version.- See Also:
-
-
Method Details
-
deserializeFromProto
public static IndependentRegressionTreeModel deserializeFromProto(int version, String className, com.google.protobuf.Any message) throws com.google.protobuf.InvalidProtocolBufferException Deserialization factory.- Parameters:
version- The serialized object version.className- The class name.message- The serialized data.- Returns:
- The deserialized object.
- Throws:
com.google.protobuf.InvalidProtocolBufferException- If the protobuf could not be parsed from themessage.
-
getDepth
Probes the trees to find the depth. -
predict
-
getTopFeatures
- Overrides:
getTopFeaturesin classTreeModel<Regressor>
-
getExcuse
-
getFeatures
- Overrides:
getFeaturesin classTreeModel<Regressor>
-
toString
-
getRoots
Returns an unmodifiable view on the root node collection.The nodes themselves are immutable.
- Returns:
- The root node collection.
-
getRoot
Returns null, as this model contains multiple roots, one per regression output dimension.Use
getRoots()instead. -
serialize
-