Class MSVM_RFE
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.embedded.EmbeddedApproach
unifeat.featureSelection.embedded.SVMBasedMethods.SVMBasedMethods
unifeat.featureSelection.embedded.SVMBasedMethods.MSVM_RFE
This java class is used to implement MSVM_RFE method for binary
classification based on SVM_RFE method (support vector machine method based
on recursive feature elimination) in which multiple linear SVMs trained on
subsamples of the original training data. K-fold cross validation is used as
the resampling method.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final double
private int
private int
Fields inherited from class unifeat.featureSelection.embedded.SVMBasedMethods.SVMBasedMethods
classLabelInTrainSet, kernelType, parameterC, TEMP_PATH
Fields inherited from class unifeat.featureSelection.embedded.EmbeddedApproach
classLabel, nameFeatures, PROJECT_PATH
Fields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet
-
Constructor Summary
ConstructorDescriptionInitializes the parametersMSVM_RFE
(String path, SVMKernelType kernelType, double c, int kFoldValue, int numRun) Initializes the parameters -
Method Summary
Modifier and TypeMethodDescriptionprotected double[][]
buildSVM_KFoldCrossValidation
(int[] selectedFeature) Generates binary classifiers (SVM by applying k-fold cross validation resampling strategy) using input data and based on selected feature subset.void
Starts the feature selection process by multiple support vector machine method based on recursive feature elimination using k-fold cross validation resampling strategy (MSVM_RFE)private double[]
getFeaturesWeights
(int[] selectedFeature) Generates binary classifiers (SVM by applying k-fold cross validation resampling strategy) using input data and based on selected feature subset, and finally returns the weights of featuresvalidate()
This method returns the potential errors in the input parameters.Methods inherited from class unifeat.featureSelection.embedded.SVMBasedMethods.SVMBasedMethods
buildSVM_OneAgainstOne, buildSVM_OneAgainstRest, createClassLabel
Methods inherited from class unifeat.featureSelection.embedded.EmbeddedApproach
loadDataSet, loadDataSet, newMethod, originalFeatureSet
Methods inherited from class unifeat.featureSelection.FeatureSelection
getSelectedFeatureSubset, setNumSelectedFeature
-
Field Details
-
ERROR_DENOMINATOR
private final double ERROR_DENOMINATOR- See Also:
-
kFoldValue
private int kFoldValue -
numRun
private int numRun
-
-
Constructor Details
-
MSVM_RFE
Initializes the parameters- Parameters:
arguments
- array of parameters contains (path
,kernelType
,Parameter c
,kFoldValue
,numRun
) in whichpath
is the path of the project,kernelType
is the type of kernel to use,Parameter c
is the complexity parameter C,kFoldValue
is the number of subsamples in k-fold cross validation, andnumRun
is the number of multiple runs of k-fold CV
-
MSVM_RFE
Initializes the parameters- Parameters:
path
- the path of the projectkernelType
- the type of kernel to usec
- the complexity parameter CkFoldValue
- the number of subsamples in k-fold cross validationnumRun
- the number of multiple runs of k-fold CV
-
-
Method Details
-
buildSVM_KFoldCrossValidation
protected double[][] buildSVM_KFoldCrossValidation(int[] selectedFeature) Generates binary classifiers (SVM by applying k-fold cross validation resampling strategy) using input data and based on selected feature subset.- Parameters:
selectedFeature
- an array of indices of the selected feature subset- Returns:
- an array of the weights of features
-
getFeaturesWeights
private double[] getFeaturesWeights(int[] selectedFeature) Generates binary classifiers (SVM by applying k-fold cross validation resampling strategy) using input data and based on selected feature subset, and finally returns the weights of features- Parameters:
selectedFeature
- an array of indices of the selected feature subset- Returns:
- an array of the weights of features
-
evaluateFeatures
public void evaluateFeatures()Starts the feature selection process by multiple support vector machine method based on recursive feature elimination using k-fold cross validation resampling strategy (MSVM_RFE)- Specified by:
evaluateFeatures
in classFeatureSelection
-
validate
This method returns the potential errors in the input parameters.- Overrides:
validate
in classFeatureSelection
- Returns:
- a string contains the information about incorrect parameters
-