Package unifeat.featureSelection
Class FeatureSelection
java.lang.Object
unifeat.featureSelection.FeatureSelection
- Direct Known Subclasses:
EmbeddedApproach
,FeatureWeighting
,FilterApproach
,HybridApproach
,WrapperApproach
The abstract class contains the main methods and fields that are used in all
feature selection methods.
- Author:
- Sina Tabakhi
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected int
protected int
protected int[]
protected double[][]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Starts the feature selection process by a given methodint[]
This method returns the subset of selected features by a given feature selection method.void
loadDataSet
(double[][] data, int numFeat, int numClasses) Loads the datasetvoid
Loads the datasetvoid
setNumSelectedFeature
(int numSelectedFeature) This method sets the number of features that should be selected by a given feature selection method.validate()
This method returns the potential errors in the input parameters.
-
Field Details
-
trainSet
protected double[][] trainSet -
numFeatures
protected int numFeatures -
numClass
protected int numClass -
selectedFeatureSubset
protected int[] selectedFeatureSubset -
numSelectedFeature
protected int numSelectedFeature
-
-
Constructor Details
-
FeatureSelection
public FeatureSelection()Initializes the parameters
-
-
Method Details
-
loadDataSet
Loads the dataset- Parameters:
ob
- an object of the DatasetInfo class
-
loadDataSet
public void loadDataSet(double[][] data, int numFeat, int numClasses) Loads the dataset- Parameters:
data
- the input dataset valuesnumFeat
- the number of features in the datasetnumClasses
- the number of classes in the dataset
-
evaluateFeatures
public abstract void evaluateFeatures()Starts the feature selection process by a given method -
validate
This method returns the potential errors in the input parameters.- Returns:
- a string contains the information about incorrect parameters
-
setNumSelectedFeature
public void setNumSelectedFeature(int numSelectedFeature) This method sets the number of features that should be selected by a given feature selection method.- Parameters:
numSelectedFeature
- the number of selected features
-
getSelectedFeatureSubset
public int[] getSelectedFeatureSubset()This method returns the subset of selected features by a given feature selection method.- Returns:
- an array of subset of selected features
-