Class RSM
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.filter.FilterApproach
unifeat.featureSelection.filter.unsupervised.RSM
This java class is used to implement the random subspace method(RSM) method.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private final MultivariateMethodTypeprivate final intprivate final intprivate final intFields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet -
Constructor Summary
ConstructorsConstructorDescriptionRSM(int sizeSelectedFeatureSubset, int numIter, int size, int threshold, MultivariateMethodType nameApproach) Initializes the parametersInitializes the parameters -
Method Summary
Modifier and TypeMethodDescriptionprivate double[][]createNewDataset(int[] index) Creates a new dataset based on the given indeces of the featuresvoidStarts the feature selection process by random subspace method(RSM)private int[]multivariateApproach(double[][] data) Selects the top feature with size THRESHOLD_ELIMINATION by given methodprivate voidpermutation(int[] indexFeat, int seed) Permutes the index of featuresvalidate()This method returns the potential errors in the input parameters.Methods inherited from class unifeat.featureSelection.filter.FilterApproach
newMethodMethods inherited from class unifeat.featureSelection.FeatureSelection
getSelectedFeatureSubset, loadDataSet, loadDataSet, setNumSelectedFeature
-
Field Details
-
NUM_ITERATION
private final int NUM_ITERATION -
SIZE_SUB_SPACE
private final int SIZE_SUB_SPACE -
THRESHOLD_ELIMINATION
private final int THRESHOLD_ELIMINATION -
NAME_MULTI_APPROACH
-
featureScore
private int[] featureScore
-
-
Constructor Details
-
RSM
Initializes the parameters- Parameters:
arguments- array of parameters contains (sizeSelectedFeatureSubset,numIter,size,threshold,nameApproach) in whichsizeSelectedFeatureSubsetis the number of selected features,numIteris the number of iteration in the RSM method,sizeis the size of the subspace,thresholdis the number of selected features in each subspace, andnameApproachis the name of the multivariate approach used in the RSM
-
RSM
public RSM(int sizeSelectedFeatureSubset, int numIter, int size, int threshold, MultivariateMethodType nameApproach) Initializes the parameters- Parameters:
sizeSelectedFeatureSubset- the number of selected featuresnumIter- the number of iteration in the RSM methodsize- the size of the subspacethreshold- the number of selected features in each subspacenameApproach- the name of the multivariate approach used in the RSM
-
-
Method Details
-
permutation
private void permutation(int[] indexFeat, int seed) Permutes the index of features- Parameters:
indexFeat- the array of the index of featuresseed- determines the index of the seed
-
multivariateApproach
private int[] multivariateApproach(double[][] data) Selects the top feature with size THRESHOLD_ELIMINATION by given method- Parameters:
data- the new dataset- Returns:
- the top feature with size THRESHOLD_ELIMINATION
-
createNewDataset
private double[][] createNewDataset(int[] index) Creates a new dataset based on the given indeces of the features- Parameters:
index- an array of the indeces of features- Returns:
- a new dataset
-
evaluateFeatures
public void evaluateFeatures()Starts the feature selection process by random subspace method(RSM)- Specified by:
evaluateFeaturesin classFeatureSelection
-
validate
This method returns the potential errors in the input parameters.- Overrides:
validatein classFeatureSelection- Returns:
- a string contains the information about incorrect parameters
-