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.0 doubles the minority class, 2.0 triples 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 penalty C for the internal SVM. Smaller values → wider margin → more support vectors selected.
highDimThreshold - the dimensionality threshold above which RandomProjectionForest is used instead of KDTree for k-NN search.
rpfNumTrees - number of trees in the RandomProjectionForest.
rpfLeafSize - maximum leaf size for the RandomProjectionForest.
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

    Constructors
    Constructor
    Description
    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 Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the highDimThreshold record component.
    int
    k()
    Returns the value of the k record component.
    double
    Returns the value of the mFactor record component.
    of(Properties props)
    Returns the options from properties.
    double
    Returns the value of the ratio record component.
    int
    Returns the value of the rpfLeafSize record component.
    int
    Returns the value of the rpfNumTrees record component.
    double
    Returns the value of the svmC record component.
    Returns the persistent set of hyperparameters including smile.svmsmote.k smile.svmsmote.ratio smile.svmsmote.m_factor smile.svmsmote.svm_c smile.svmsmote.high_dim_threshold smile.svmsmote.rpf_num_trees smile.svmsmote.rpf_leaf_size
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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

      public Properties toProperties()
      Returns the persistent set of hyperparameters including
      • smile.svmsmote.k
      • smile.svmsmote.ratio
      • smile.svmsmote.m_factor
      • smile.svmsmote.svm_c
      • smile.svmsmote.high_dim_threshold
      • smile.svmsmote.rpf_num_trees
      • smile.svmsmote.rpf_leaf_size
      Returns:
      the persistent set.
    • of

      public static SVMSMOTE.Options of(Properties props)
      Returns the options from properties.
      Parameters:
      props - the hyperparameters.
      Returns:
      the options.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • k

      public int k()
      Returns the value of the k record component.
      Returns:
      the value of the k record component
    • ratio

      public double ratio()
      Returns the value of the ratio record component.
      Returns:
      the value of the ratio record component
    • mFactor

      public double mFactor()
      Returns the value of the mFactor record component.
      Returns:
      the value of the mFactor record component
    • svmC

      public double svmC()
      Returns the value of the svmC record component.
      Returns:
      the value of the svmC record component
    • highDimThreshold

      public int highDimThreshold()
      Returns the value of the highDimThreshold record component.
      Returns:
      the value of the highDimThreshold record component
    • rpfNumTrees

      public int rpfNumTrees()
      Returns the value of the rpfNumTrees record component.
      Returns:
      the value of the rpfNumTrees record component
    • rpfLeafSize

      public int rpfLeafSize()
      Returns the value of the rpfLeafSize record component.
      Returns:
      the value of the rpfLeafSize record component