Class SVM_RFE
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.embedded.EmbeddedApproach
unifeat.featureSelection.embedded.SVMBasedMethods.SVMBasedMethods
unifeat.featureSelection.embedded.SVMBasedMethods.SVM_RFE
This java class is used to implement support vector machine method based on
recursive feature elimination (SVM_RFE).
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
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 parametersSVM_RFE
(String path, SVMKernelType kernelType, double c) Initializes the parameters -
Method Summary
Modifier and TypeMethodDescriptionvoid
Starts the feature selection process by support vector machine method based on recursive feature elimination (SVM_RFE)private double[]
getFeaturesWeights
(int[] selectedFeature) Generates a classifier (SVM) using input data and based on selected feature subset, and finally returns the weights of features based on ranking criterion (weight magnitude)validate()
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
-
Constructor Details
-
SVM_RFE
Initializes the parameters- Parameters:
arguments
- array of parameters contains (path
,kernelType
,Parameter c
) in whichpath
is the path of the project,kernelType
is the type of kernel to use, andParameter c
is the complexity parameter C
-
SVM_RFE
Initializes the parameters- Parameters:
path
- the path of the projectkernelType
- the type of kernel to usec
- the complexity parameter C
-
-
Method Details
-
getFeaturesWeights
private double[] getFeaturesWeights(int[] selectedFeature) Generates a classifier (SVM) using input data and based on selected feature subset, and finally returns the weights of features based on ranking criterion (weight magnitude)- 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 support vector machine method based on recursive feature elimination (SVM_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
-