Record Class BSO.Options
java.lang.Object
java.lang.Record
smile.classification.resampling.BSO.Options
- Record Components:
m- neighborhood size used to classify each minority sample as NOISE / DANGER / SAFE. Typical value: 5.kMaj- number of nearest majority neighbors used to compute the shift centroid. Typical value: 3. When0, the shifting mechanism is disabled and the algorithm falls back to standard Borderline-SMOTE interpolation.alpha- shift factorα ∈ (0, 1)— proportion of the vector from seed to majority centroid to traverse when placing a synthetic sample. Smaller values keep synthetics closer to the minority side.ratio- over-sampling ratio relative to the minority class size.1.0doubles the minority class. Must be positive.strategy-BSO.Strategy.DANGERorBSO.Strategy.DANGER_AND_SAFE.highDimThreshold- the dimensionality threshold above whichRandomProjectionForestis used instead ofKDTree.rpfNumTrees- number of trees in theRandomProjectionForest.rpfLeafSize- maximum leaf size for theRandomProjectionForest.
- Enclosing class:
BSO
public static record BSO.Options(int m, int kMaj, double alpha, double ratio, BSO.Strategy strategy, int highDimThreshold, int rpfNumTrees, int rpfLeafSize)
extends Record
BSO hyperparameters.
-
Constructor Summary
ConstructorsConstructorDescriptionOptions()Default constructor: m=5, kMaj=3, alpha=0.2, ratio=1.0, strategy=DANGER, highDimThreshold=20, rpfNumTrees=10, rpfLeafSize=30.Options(int m, int kMaj, double alpha, double ratio, BSO.Strategy variant) Constructor with core parameters and default index / dimension settings.Options(int m, int kMaj, double alpha, double ratio, BSO.Strategy strategy, int highDimThreshold, int rpfNumTrees, int rpfLeafSize) Compact constructor with validation. -
Method Summary
Modifier and TypeMethodDescriptiondoublealpha()Returns the value of thealpharecord component.final 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.intkMaj()Returns the value of thekMajrecord component.intm()Returns the value of themrecord component.static BSO.Optionsof(Properties props) Returns the options from properties.doubleratio()Returns the value of theratiorecord component.intReturns the value of therpfLeafSizerecord component.intReturns the value of therpfNumTreesrecord component.strategy()Returns the value of thestrategyrecord component.Returns the persistent set of hyperparameters includingsmile.bso.msmile.bso.k_majsmile.bso.alphasmile.bso.ratiosmile.bso.strategysmile.bso.high_dim_thresholdsmile.bso.rpf_num_treessmile.bso.rpf_leaf_sizefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Options
public Options()Default constructor: m=5, kMaj=3, alpha=0.2, ratio=1.0, strategy=DANGER, highDimThreshold=20, rpfNumTrees=10, rpfLeafSize=30. -
Options
Constructor with core parameters and default index / dimension settings.- Parameters:
m- neighborhood size for borderline classification.kMaj- number of majority neighbors for shift centroid.alpha- shift factor.ratio- over-sampling ratio.variant- BSO strategy.
-
Options
public Options(int m, int kMaj, double alpha, double ratio, BSO.Strategy strategy, int highDimThreshold, int rpfNumTrees, int rpfLeafSize) Compact constructor with validation.
-
-
Method Details
-
toProperties
Returns the persistent set of hyperparameters includingsmile.bso.msmile.bso.k_majsmile.bso.alphasmile.bso.ratiosmile.bso.strategysmile.bso.high_dim_thresholdsmile.bso.rpf_num_treessmile.bso.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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
m
-
kMaj
-
alpha
-
ratio
-
strategy
-
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
-