Record Class TomekLinks.Options
java.lang.Object
java.lang.Record
smile.classification.resampling.TomekLinks.Options
- Record Components:
highDimThreshold- the dimensionality threshold above whichRandomProjectionForestis used instead ofKDTreefor nearest-neighbor search.rpfNumTrees- number of trees in theRandomProjectionForest.rpfLeafSize- maximum leaf size for theRandomProjectionForest.
- Enclosing class:
TomekLinks
public static record TomekLinks.Options(int highDimThreshold, int rpfNumTrees, int rpfLeafSize)
extends Record
TomekLinks hyperparameters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thehighDimThresholdrecord component.static TomekLinks.Optionsof(Properties props) Returns the options from properties.intReturns the value of therpfLeafSizerecord component.intReturns the value of therpfNumTreesrecord component.Returns the persistent set of hyperparameters includingsmile.tomek.high_dim_thresholdsmile.tomek.rpf_num_treessmile.tomek.rpf_leaf_sizefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Options
public Options()Default constructor: highDimThreshold=20, rpfNumTrees=10, rpfLeafSize=30. -
Options
public Options(int highDimThreshold, int rpfNumTrees, int rpfLeafSize) Compact constructor with validation.
-
-
Method Details
-
toProperties
Returns the persistent set of hyperparameters includingsmile.tomek.high_dim_thresholdsmile.tomek.rpf_num_treessmile.tomek.rpf_leaf_size
- Returns:
- the persistent set.
-
of
Returns the options from properties.- Parameters:
props- the hyperparameters.- Returns:
- the options.
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
highDimThreshold
public int highDimThreshold()Returns the value of thehighDimThresholdrecord component.- Returns:
- the value of the
highDimThresholdrecord component
-
rpfNumTrees
public int rpfNumTrees()Returns the value of therpfNumTreesrecord component.- Returns:
- the value of the
rpfNumTreesrecord component
-
rpfLeafSize
public int rpfLeafSize()Returns the value of therpfLeafSizerecord component.- Returns:
- the value of the
rpfLeafSizerecord component
-