Package smile.regression
Record Class RandomForest.Model
java.lang.Object
java.lang.Record
smile.regression.RandomForest.Model
- Record Components:
tree
- The regression tree.metrics
- The validation metrics on out-of-bag samples.
- All Implemented Interfaces:
Serializable
,Comparable<RandomForest.Model>
- Enclosing class:
RandomForest
public static record RandomForest.Model(RegressionTree tree, RegressionMetrics metrics)
extends Record
implements Serializable, Comparable<RandomForest.Model>
The base model.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModel
(RegressionTree tree, RegressionMetrics metrics) Creates an instance of aModel
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.metrics()
Returns the value of themetrics
record component.final String
toString()
Returns a string representation of this record class.tree()
Returns the value of thetree
record component.
-
Constructor Details
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<RandomForest.Model>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
tree
Returns the value of thetree
record component.- Returns:
- the value of the
tree
record component
-
metrics
Returns the value of themetrics
record component.- Returns:
- the value of the
metrics
record component
-