Package unifeat.featureSelection.wrapper
Class WrapperApproach
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.wrapper.WrapperApproach
The abstract class contains the main methods and fields that are used in all
wrapper-based feature selection methods.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String[]
protected String[]
protected final String
protected final String
Fields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
loadDataSet
(double[][] data, int numFeat, int numClasses) Loads the datasetvoid
Loads the datasetstatic WrapperApproach
newMethod
(WrapperType type, Object... arguments) This method creates new object from one of the classes that has been inherited from the WrapperApproach class according to type of the feature selection method.protected int[]
This method creates an array of indices of features and returns it.Methods inherited from class unifeat.featureSelection.FeatureSelection
evaluateFeatures, getSelectedFeatureSubset, setNumSelectedFeature, validate
-
Field Details
-
nameFeatures
-
classLabel
-
PROJECT_PATH
-
TEMP_PATH
-
-
Constructor Details
-
WrapperApproach
Initializes the parameters- Parameters:
path
- the path of the project
-
-
Method Details
-
loadDataSet
Loads the dataset- Overrides:
loadDataSet
in classFeatureSelection
- Parameters:
ob
- an object of the DatasetInfo class
-
loadDataSet
public void loadDataSet(double[][] data, int numFeat, int numClasses) Loads the dataset- Overrides:
loadDataSet
in classFeatureSelection
- Parameters:
data
- the input dataset valuesnumFeat
- the number of features in the datasetnumClasses
- the number of classes in the dataset
-
originalFeatureSet
protected int[] originalFeatureSet()This method creates an array of indices of features and returns it.- Returns:
- an array of features indices
-
newMethod
This method creates new object from one of the classes that has been inherited from the WrapperApproach class according to type of the feature selection method.- Parameters:
type
- type of the wrapper feature selection methodarguments
- a list of arguments that is applied in the feature selection method- Returns:
- the created object that has been inherited from the WrapperApproach class
-