Package unifeat.featureSelection
Class FitnessEvaluator
java.lang.Object
unifeat.featureSelection.FitnessEvaluator
This java class is used to implement fitness evaluator of a solution in which
k-fold cross validation on training set is used for evaluating the
classification performance of a selected feature subset.
- Author:
- Sina Tabakhi
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFitnessEvaluator(String path, Object classifierName, Object selectedEvaluationClassifierPanel, int kFolds) Initializes the parameters -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method creates a directory based on the specific pathcrossValidation(int[] selectedFeature) This method performs k-fold cross validation on the reduced training set which is achieved by selected feature subset.voidThis method deletes the current directory with all files in the directoryvoidsetDataInfo(double[][] data, String[] nameFeatures, String[] classLabel) This method sets the information of the dataset.
-
Constructor Details
-
FitnessEvaluator
public FitnessEvaluator(String path, Object classifierName, Object selectedEvaluationClassifierPanel, int kFolds) Initializes the parameters- Parameters:
path- the temp path in the projectclassifierName- the name of given classifierselectedEvaluationClassifierPanel- panel of the selected classifier contained the parameter valueskFolds- the number of equal sized subsamples that is used in k-fold cross validation
-
-
Method Details
-
setDataInfo
This method sets the information of the dataset.- Parameters:
data- the input dataset valuesnameFeatures- the string array of features namesclassLabel- the string array of class labels names
-
crossValidation
This method performs k-fold cross validation on the reduced training set which is achieved by selected feature subset.- Parameters:
selectedFeature- an array of indices of the selected feature subset- Returns:
- the different criteria values
-
createTempDirectory
public void createTempDirectory()This method creates a directory based on the specific path -
deleteTempDirectory
public void deleteTempDirectory()This method deletes the current directory with all files in the directory
-