Class BasicPSO<SwarmType>
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.wrapper.WrapperApproach
unifeat.featureSelection.wrapper.PSOBasedMethods.BasicPSO<SwarmType>
- Type Parameters:
SwarmType
- the type of swarm implemented in PSO algorithm
The abstract class contains the main methods and fields that are used in all
PSO-based feature selection methods.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Fields inherited from class unifeat.featureSelection.wrapper.WrapperApproach
classLabel, nameFeatures, PROJECT_PATH, TEMP_PATH
Fields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int[]
This method creates the selected feature subset based on global best position in the swarm.validate()
This method returns the potential errors in the input parameters.Methods inherited from class unifeat.featureSelection.wrapper.WrapperApproach
loadDataSet, loadDataSet, newMethod, originalFeatureSet
Methods inherited from class unifeat.featureSelection.FeatureSelection
evaluateFeatures, getSelectedFeatureSubset, setNumSelectedFeature
-
Field Details
-
swarm
-
NUM_ITERATION
protected final int NUM_ITERATION -
K_FOLDS
protected final int K_FOLDS
-
-
Constructor Details
-
BasicPSO
Initializes the parameters- Parameters:
arguments
- array of parameters contains (path
,numFeatures
,classifierType
,selectedClassifierPan
,numIteration
populationSize
,inertiaWeight
,parameter c1
,parameter c2
,startPosInterval
,endPosInterval
,minVelocity
,maxVelocity
,kFolds
) in whichpath
is the path of the project,numFeatures
is the number of original features in the dataset,classifierType
is the classifier type for evaluating the fitness of a solution,selectedClassifierPan
is the selected classifier panel,numIteration
is the maximum number of allowed iterations that algorithm repeated,populationSize
is the size of population of candidate solutions,inertiaWeight
is the inertia weight in the velocity updating rule,parameter c1
is the acceleration constant in the velocity updating rule,parameter c2
is the acceleration constant in the velocity updating rule,startPosInterval
is the position interval start value,endPosInterval
is the position interval end value,minVelocity
is the velocity interval start value,maxVelocity
is the velocity interval end value, andkFolds
is the number of equal sized subsamples that is used in k-fold cross validation
-
-
Method Details
-
createSelectedFeatureSubset
protected abstract int[] createSelectedFeatureSubset()This method creates the selected feature subset based on global best position in the swarm.- Returns:
- the array of indices of the selected feature subset
-
validate
This method returns the potential errors in the input parameters.- Overrides:
validate
in classFeatureSelection
- Returns:
- a string contains the information about incorrect parameters
-