Documentation of 'jsat.classifiers.imbalance.BorderlineSMOTE' Java class
BorderlineSMOTE
jsat.classifiers.imbalance

Class BorderlineSMOTE

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Classifier, Parameterized


    public class BorderlineSMOTE
    extends SMOTE
    This class implements the Borderline extension of the SMOTE algorithm for dealing with class imbalance. SMOTE over-samples from the minority class at random points in the space. Borderline smote attempts to estimate which points are on the border of the class bounder, and over-samples only from the points on the boarder. Boarderline-SMOTE can also choose to perform interpolation using samples for the majority class, which can sometimes improve performance. The border is impacted by changes to the number of neighbors used. In the rare event that a boarder can't be estimated, this implementation will fall back to standard SMOTE.
    This implementation extends the original SMOTE algorithm to the multi-class case.

    See: Han, H., Wang, W.-Y., & Mao, B.-H. (2005). Borderline-SMOTE: A New Over-sampling Method in Imbalanced Data Sets Learning. In Proceedings of the 2005 International Conference on Advances in Intelligent Computing - Volume Part I (pp. 878–887). Berlin, Heidelberg: Springer-Verlag. DOI:10.1007/11538059_91
    See Also:
    Serialized Form
    • Constructor Detail

      • BorderlineSMOTE

        public BorderlineSMOTE(Classifier baseClassifier)
        Creates a new Borderline-SMOTE model that will over-sample the minority classes so that there is a balanced number of data points in each class. It will not use majority interpolation.
        Parameters:
        baseClassifier - the base classifier to use after the SMOTEing is done.
      • BorderlineSMOTE

        public BorderlineSMOTE(Classifier baseClassifier,
                               boolean majorityInterpolation)
        Creates a new Borderline-SMOTE model that will over-sample the minority classes so that there is a balanced number of data points in each class.
        Parameters:
        baseClassifier - the base classifier to use after the SMOTEing is done.
        majorityInterpolation - true if synthetic examples should use the majority class as well, or false to use only the minority class.
      • BorderlineSMOTE

        public BorderlineSMOTE(Classifier baseClassifier,
                               DistanceMetric dm,
                               boolean majorityInterpolation)
        Creates a new Borderline-SMOTE model that will over-sample the minority classes so that there is a balanced number of data points in each class.
        Parameters:
        baseClassifier - the base classifier to use after the SMOTEing is done.
        dm - the distance metric to use for determining nearest neighbors
        majorityInterpolation - true if synthetic examples should use the majority class as well, or false to use only the minority class.
      • BorderlineSMOTE

        public BorderlineSMOTE(Classifier baseClassifier,
                               DistanceMetric dm,
                               double targetRatio,
                               boolean majorityInterpolation)
        Creates a new Borderline-SMOTE model.
        Parameters:
        baseClassifier - the base classifier to use after the SMOTEing is done.
        dm - the distance metric to use for determining nearest neighbors
        targetRatio - the desired ratio of samples for each class with respect to the majority class.
        majorityInterpolation - true if synthetic examples should use the majority class as well, or false to use only the minority class.
      • BorderlineSMOTE

        public BorderlineSMOTE(Classifier baseClassifier,
                               DistanceMetric dm,
                               int smoteNeighbors,
                               double targetRatio,
                               boolean majorityInterpolation)
        Creates a new SMOTE object
        Parameters:
        baseClassifier - the base classifier to use after the SMOTEing is done.
        dm - the distance metric to use for determining nearest neighbors
        smoteNeighbors - the number of neighbors to look at when interpolating points
        targetRatio - the desired ratio of samples for each class with respect to the majority class.
        majorityInterpolation - true if synthetic examples should use the majority class as well, or false to use only the minority class.
      • BorderlineSMOTE

        public BorderlineSMOTE(BorderlineSMOTE toCopy)
        Copy constructor
        Parameters:
        toCopy - the object to copy
    • Method Detail

      • setMajorityInterpolation

        public void setMajorityInterpolation(boolean majorityInterpolation)
        Sets whether the generation of synthetic samples can make use of the majority samples (i.e., from other classes) or not. The use of majority samples is "Borderline-SMOTE2" in the original paper. If majority samples are not used, it is equivalent to "Borderline-SMOTE1".
        Parameters:
        majorityInterpolation - true if majority samples should be used for interpolation, and false if only minority samples should be used.
      • isMajorityInterpolation

        public boolean isMajorityInterpolation()
        Returns:
        true if majority samples should be used for interpolation, and false if only minority samples should be used.
      • train

        public void train(ClassificationDataSet dataSet,
                          boolean parallel)
        Description copied from interface: Classifier
        Trains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.
        Specified by:
        train in interface Classifier
        Overrides:
        train in class SMOTE
        Parameters:
        dataSet - the data set to train on
        parallel - true if multiple threads should be used to train the model. false if it should be done in a single threaded manner.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.