Class SVMBasedMethods
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.embedded.EmbeddedApproach
unifeat.featureSelection.embedded.SVMBasedMethods.SVMBasedMethods
- Direct Known Subclasses:
MSVM_RFE
,OVA_SVM_RFE
,OVO_SVM_RFE
,SVM_RFE
The abstract class contains the main methods and fields that are used in all
SVM-based feature selection methods. This class inherits from
EmbeddedApproach class.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected double[]
protected SVMKernelType
protected double
protected final String
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
ConstructorDescriptionSVMBasedMethods
(Object... arguments) Initializes the parametersSVMBasedMethods
(String path, SVMKernelType kernelType, double c) Initializes the parameters -
Method Summary
Modifier and TypeMethodDescriptionprotected double[][][]
buildSVM_OneAgainstOne
(int[] selectedFeature) Generates binary classifiers (SVM) using input data and based on selected feature subset, and finally returns the weights of features.protected double[][]
buildSVM_OneAgainstRest
(int[] selectedFeature) Generates binary classifiers (SVM) using input data and based on selected feature subset, and finally returns the weights of features.void
Creates an array of class labels available in the train setMethods inherited from class unifeat.featureSelection.embedded.EmbeddedApproach
loadDataSet, loadDataSet, newMethod, originalFeatureSet
Methods inherited from class unifeat.featureSelection.FeatureSelection
evaluateFeatures, getSelectedFeatureSubset, setNumSelectedFeature, validate
-
Field Details
-
TEMP_PATH
-
kernelType
-
parameterC
protected double parameterC -
classLabelInTrainSet
protected double[] classLabelInTrainSet
-
-
Constructor Details
-
SVMBasedMethods
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
-
SVMBasedMethods
Initializes the parameters- Parameters:
path
- the path of the projectkernelType
- the type of kernel to usec
- the complexity parameter C
-
-
Method Details
-
createClassLabel
public void createClassLabel()Creates an array of class labels available in the train set -
buildSVM_OneAgainstOne
protected double[][][] buildSVM_OneAgainstOne(int[] selectedFeature) Generates binary classifiers (SVM) using input data and based on selected feature subset, and finally returns the weights of features. One-Versus-One strategy is used to construct classifiers in multiclass classification.- Parameters:
selectedFeature
- an array of indices of the selected feature subset- Returns:
- an array of the weights of features
-
buildSVM_OneAgainstRest
protected double[][] buildSVM_OneAgainstRest(int[] selectedFeature) Generates binary classifiers (SVM) using input data and based on selected feature subset, and finally returns the weights of features. One-Versus-All strategy is used to construct classifiers in multiclass classification.- Parameters:
selectedFeature
- an array of indices of the selected feature subset- Returns:
- an array of the weights of features
-