Record Class SVMSMOTE.Options
java.lang.Object
java.lang.Record
smile.classification.resampling.SVMSMOTE.Options
- Record Components:
k- the number of nearest minority neighbors used for interpolation (typically 5).ratio- the over-sampling ratio relative to the minority class size.1.0doubles the minority class,2.0triples it, etc. Must be positive.mFactor- margin factor — scales the SVM margin band used to select support vectors. Larger values include more minority samples as seeds. Must be non-negative.svmC- the soft-margin penaltyCfor the internal SVM. Smaller values → wider margin → more support vectors selected.highDimThreshold- the dimensionality threshold above whichRandomProjectionForestis used instead ofKDTreefor k-NN search.rpfNumTrees- number of trees in theRandomProjectionForest.rpfLeafSize- maximum leaf size for theRandomProjectionForest.
- Enclosing class:
SVMSMOTE
public static record SVMSMOTE.Options(int k, double ratio, double mFactor, double svmC, int highDimThreshold, int rpfNumTrees, int rpfLeafSize)
extends Record
SVM-SMOTE hyperparameters.
-
Constructor Summary
ConstructorsConstructorDescriptionOptions()Default constructor: k=5, ratio=1.0, mFactor=10.0, svmC=1.0, highDimThreshold=20, rpfNumTrees=10, rpfLeafSize=30.Options(int k, double ratio) Constructor with default SVM and index parameters.Options(int k, double ratio, double mFactor, double svmC, int highDimThreshold, int rpfNumTrees, int rpfLeafSize) Compact constructor with validation. -
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.intk()Returns the value of thekrecord component.doublemFactor()Returns the value of themFactorrecord component.static SVMSMOTE.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.doublesvmC()Returns the value of thesvmCrecord component.Returns the persistent set of hyperparameters includingsmile.svmsmote.ksmile.svmsmote.ratiosmile.svmsmote.m_factorsmile.svmsmote.svm_csmile.svmsmote.high_dim_thresholdsmile.svmsmote.rpf_num_treessmile.svmsmote.rpf_leaf_sizefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Options
public Options()Default constructor: k=5, ratio=1.0, mFactor=10.0, svmC=1.0, highDimThreshold=20, rpfNumTrees=10, rpfLeafSize=30. -
Options
public Options(int k, double ratio) Constructor with default SVM and index parameters.- Parameters:
k- number of nearest neighbors.ratio- over-sampling ratio.
-
Options
public Options(int k, double ratio, double mFactor, double svmC, int highDimThreshold, int rpfNumTrees, int rpfLeafSize) Compact constructor with validation.
-
-
Method Details
-
toProperties
Returns the persistent set of hyperparameters includingsmile.svmsmote.ksmile.svmsmote.ratiosmile.svmsmote.m_factorsmile.svmsmote.svm_csmile.svmsmote.high_dim_thresholdsmile.svmsmote.rpf_num_treessmile.svmsmote.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. -
k
-
ratio
-
mFactor
-
svmC
-
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
-