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
FieldsFields inherited from class unifeat.featureSelection.wrapper.WrapperApproach
classLabel, nameFeatures, PROJECT_PATH, TEMP_PATHFields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet - 
Constructor Summary
Constructors - 
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, originalFeatureSetMethods 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,numIterationpopulationSize,inertiaWeight,parameter c1,parameter c2,startPosInterval,endPosInterval,minVelocity,maxVelocity,kFolds) in whichpathis the path of the project,numFeaturesis the number of original features in the dataset,classifierTypeis the classifier type for evaluating the fitness of a solution,selectedClassifierPanis the selected classifier panel,numIterationis the maximum number of allowed iterations that algorithm repeated,populationSizeis the size of population of candidate solutions,inertiaWeightis the inertia weight in the velocity updating rule,parameter c1is the acceleration constant in the velocity updating rule,parameter c2is the acceleration constant in the velocity updating rule,startPosIntervalis the position interval start value,endPosIntervalis the position interval end value,minVelocityis the velocity interval start value,maxVelocityis the velocity interval end value, andkFoldsis 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:
 validatein classFeatureSelection- Returns:
 - a string contains the information about incorrect parameters
 
 
 -