Documentation of 'jsat.datatransform.featureselection.SBS' Java class
SBS
jsat.datatransform.featureselection

Class SBS

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


    public class SBS
    extends RemoveAttributeTransform
    Sequential Backward Selection (SBS) is a greedy method of selecting a subset of features to use for prediction. It starts from the set of all features and attempts to remove the least informative feature from the set at each iteration
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      SBS(int minFeatures, int maxFeatures, ClassificationDataSet cds, Classifier evaluater, int folds, double maxDecrease)
      Performs SBS feature selection for a classification problem
      SBS(int minFeatures, int maxFeatures, Classifier evaluater, double maxDecrease)
      Performs SBS feature selection for a classification problem
      SBS(int minFeatures, int maxFeatures, RegressionDataSet rds, Regressor evaluater, int folds, double maxDecrease)
      Performs SBS feature selection for a regression problem
      SBS(int minFeatures, int maxFeatures, Regressor evaluater, double maxDecrease)
      Performs SBS feature selection for a regression problem
    • Constructor Detail

      • SBS

        public SBS(int minFeatures,
                   int maxFeatures,
                   Classifier evaluater,
                   double maxDecrease)
        Performs SBS feature selection for a classification problem
        Parameters:
        minFeatures - the minimum number of features to find
        maxFeatures - the maximum number of features to find
        evaluater - the classifier to use in determining accuracy given a feature subset
        folds - the number of cross validation folds to use in selection
        maxDecrease - the maximum tolerable decrease in accuracy in accuracy when a feature is removed
      • SBS

        public SBS(int minFeatures,
                   int maxFeatures,
                   ClassificationDataSet cds,
                   Classifier evaluater,
                   int folds,
                   double maxDecrease)
        Performs SBS feature selection for a classification problem
        Parameters:
        minFeatures - the minimum number of features to find
        maxFeatures - the maximum number of features to find
        cds - the data set to perform feature selection on
        evaluater - the classifier to use in determining accuracy given a feature subset
        folds - the number of cross validation folds to use in selection
        maxDecrease - the maximum tolerable decrease in accuracy in accuracy when a feature is removed
      • SBS

        public SBS(int minFeatures,
                   int maxFeatures,
                   Regressor evaluater,
                   double maxDecrease)
        Performs SBS feature selection for a regression problem
        Parameters:
        minFeatures - the minimum number of features to find
        maxFeatures - the maximum number of features to find
        evaluater - the regressor to use in determining accuracy given a feature subset
        maxDecrease - the maximum tolerable increase in the error rate when a feature is removed
      • SBS

        public SBS(int minFeatures,
                   int maxFeatures,
                   RegressionDataSet rds,
                   Regressor evaluater,
                   int folds,
                   double maxDecrease)
        Performs SBS feature selection for a regression problem
        Parameters:
        minFeatures - the minimum number of features to find
        maxFeatures - the maximum number of features to find
        rds - the data set to perform feature selection on
        evaluater - the regressor to use in determining accuracy given a feature subset
        folds - the number of cross validation folds to use in selection
        maxDecrease - the maximum tolerable increase in the error rate when a feature is removed
    • Method Detail

      • fit

        public void fit(DataSet data)
        Description copied from interface: DataTransform
        Fits this transform to the given dataset. Some transforms can only be learned from classification or regression datasets. If an incompatible dataset type is given, a FailedToFitException exception may be thrown.
        Specified by:
        fit in interface DataTransform
        Overrides:
        fit in class RemoveAttributeTransform
        Parameters:
        data - the dataset to fir this transform to
      • getSelectedCategorical

        public java.util.Set<java.lang.Integer> getSelectedCategorical()
        Returns a copy of the set of categorical features selected by the search algorithm
        Returns:
        the set of categorical features to use
      • getSelectedNumerical

        public java.util.Set<java.lang.Integer> getSelectedNumerical()
        Returns a copy of the set of numerical features selected by the search algorithm.
        Returns:
        the set of numeric features to use
      • setMaxDecrease

        public void setMaxDecrease(double maxDecrease)
        Sets the maximum allowable decrease in accuracy (increase in error) from the previous set of features to the new current set.
        Parameters:
        maxDecrease - the maximum allowable decrease in the accuracy from removing a feature
      • getMaxDecrease

        public double getMaxDecrease()
        Returns the maximum allowable decrease in accuracy from one set of features to the next
        Returns:
        the maximum allowable decrease in accuracy from one set of features to the next
      • setMinFeatures

        public void setMinFeatures(int minFeatures)
        Sets the minimum number of features that must be selected
        Parameters:
        minFeatures - the minimum number of features to learn
      • getMinFeatures

        public int getMinFeatures()
        Returns the minimum number of features to find
        Returns:
        the minimum number of features to find
      • setMaxFeatures

        public void setMaxFeatures(int maxFeatures)
        Sets the maximum number of features that must be selected
        Parameters:
        maxFeatures - the maximum number of features to find
      • getMaxFeatures

        public int getMaxFeatures()
        Returns the maximum number of features to find
        Returns:
        the maximum number of features to find
      • setFolds

        public void setFolds(int folds)
        Sets the number of folds to use for cross validation when estimating the error rate
        Parameters:
        folds - the number of folds to use for cross validation when estimating the error rate
      • getFolds

        public int getFolds()
        Returns:
        the number of folds to use for cross validation when estimating the error rate

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.