jsat.datatransform.featureselection
Class MutualInfoFS
- java.lang.Object
-
- jsat.datatransform.RemoveAttributeTransform
-
- jsat.datatransform.featureselection.MutualInfoFS
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, DataTransform
public class MutualInfoFS extends RemoveAttributeTransform
Performs greedy feature selection based on Mutual Information of the features with respect to the class values. This is an attempt to select features that are discriminative for classification tasks.
The method of performing Mutual Information on numeric attributes is controlled byMutualInfoFS.NumericalHandeling- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classMutualInfoFS.NumericalHandelingThe definition for mutual information for continuous attributes requires an integration of an unknown function, as such requires some form of approximation.
-
Constructor Summary
Constructors Constructor and Description MutualInfoFS()Creates a new Mutual Information feature selection object that attempts to select up to 100 features.MutualInfoFS(ClassificationDataSet dataSet, int featureCount)Creates a new Mutual Information feature selection object.MutualInfoFS(ClassificationDataSet dataSet, int featureCount, MutualInfoFS.NumericalHandeling numericHandling)Creates a new Mutual Information feature selection object.MutualInfoFS(int featureCount)Creates a new Mutual Information feature selection object.MutualInfoFS(int featureCount, MutualInfoFS.NumericalHandeling numericHandling)Creates a new Mutual Information feature selection object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description MutualInfoFSclone()voidfit(DataSet data)Fits this transform to the given dataset.intgetFeatureCount()Returns the number of features to selectMutualInfoFS.NumericalHandelinggetHandling()Returns the method of numericHandling numeric featuresvoidsetFeatureCount(int featureCount)Sets the number of features to selectvoidsetHandling(MutualInfoFS.NumericalHandeling handling)Sets the method of numericHandling numeric features-
Methods inherited from class jsat.datatransform.RemoveAttributeTransform
consolidate, getKeptNominal, getKeptNumeric, getReverseNominalMap, getReverseNumericMap, transform
-
-
-
-
Constructor Detail
-
MutualInfoFS
public MutualInfoFS()
Creates a new Mutual Information feature selection object that attempts to select up to 100 features. Numeric attributes are handled byMutualInfoFS.NumericalHandeling.BINARY
-
MutualInfoFS
public MutualInfoFS(int featureCount)
Creates a new Mutual Information feature selection object. Numeric attributes are handled byMutualInfoFS.NumericalHandeling.BINARY- Parameters:
featureCount- the number of features to select
-
MutualInfoFS
public MutualInfoFS(ClassificationDataSet dataSet, int featureCount)
Creates a new Mutual Information feature selection object. Numeric attributes are handled byMutualInfoFS.NumericalHandeling.BINARY- Parameters:
dataSet- the classification data set to perform feature selection fromfeatureCount- the number of features to select
-
MutualInfoFS
public MutualInfoFS(int featureCount, MutualInfoFS.NumericalHandeling numericHandling)Creates a new Mutual Information feature selection object.- Parameters:
featureCount- the number of features to selectnumericHandling- the way to handle the computation of mutual information for numeric attributes
-
MutualInfoFS
public MutualInfoFS(ClassificationDataSet dataSet, int featureCount, MutualInfoFS.NumericalHandeling numericHandling)
Creates a new Mutual Information feature selection object.- Parameters:
dataSet- the classification data set to perform feature selection fromfeatureCount- the number of features to selectnumericHandling- the way to handle the computation of mutual information for numeric attributes
-
-
Method Detail
-
fit
public void fit(DataSet data)
Description copied from interface:DataTransformFits this transform to the given dataset. Some transforms can only be learned from classification or regression datasets. If an incompatible dataset type is given, aFailedToFitExceptionexception may be thrown.- Specified by:
fitin interfaceDataTransform- Overrides:
fitin classRemoveAttributeTransform- Parameters:
data- the dataset to fir this transform to
-
clone
public MutualInfoFS clone()
- Specified by:
clonein interfaceDataTransform- Overrides:
clonein classRemoveAttributeTransform
-
setFeatureCount
public void setFeatureCount(int featureCount)
Sets the number of features to select- Parameters:
featureCount- the number of features to select
-
getFeatureCount
public int getFeatureCount()
Returns the number of features to select- Returns:
- the number of features to select
-
setHandling
public void setHandling(MutualInfoFS.NumericalHandeling handling)
Sets the method of numericHandling numeric features- Parameters:
handling- the numeric numericHandling
-
getHandling
public MutualInfoFS.NumericalHandeling getHandling()
Returns the method of numericHandling numeric features- Returns:
- the method of numericHandling numeric features
-
-
DataMelt 3.0 © DataMelt by jWork.ORG