Class PSO42
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.wrapper.WrapperApproach
unifeat.featureSelection.wrapper.PSOBasedMethods.BasicPSO<Swarm>
unifeat.featureSelection.wrapper.PSOBasedMethods.PSO42.PSO42
This java class is used to implement feature selection method based on
particle swarm optimization version 4-2(PSO(4-2)) with new initialization
strategy and updating rule in which the type of Swarm is extended from Swarm
class.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Fields inherited from class unifeat.featureSelection.wrapper.PSOBasedMethods.BasicPSO
K_FOLDS, NUM_ITERATION, swarmFields 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 int[]This method creates the selected feature subset based on global best position in the swarm.voidStarts the feature selection process by particle swarm optimization version 4-2(PSO(4-2)) methodMethods inherited from class unifeat.featureSelection.wrapper.WrapperApproach
loadDataSet, loadDataSet, newMethod, originalFeatureSetMethods inherited from class unifeat.featureSelection.FeatureSelection
getSelectedFeatureSubset, setNumSelectedFeature
-
Constructor Details
-
PSO42
Initializes the parameters- Parameters:
arguments- array of parameters contains (path,numFeatures,classifierType,selectedClassifierPan,numIterationpopulationSize,inertiaWeight,parameter c1,parameter c2,startPosInterval,endPosInterval,minVelocity,maxVelocity,kFolds,theta) 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,kFoldsis the number of equal sized subsamples that is used in k-fold cross validation, andthetais the threshold used to determine whether a feature is selected or not
-
-
Method Details
-
createSelectedFeatureSubset
protected int[] createSelectedFeatureSubset()This method creates the selected feature subset based on global best position in the swarm.- Specified by:
createSelectedFeatureSubsetin classBasicPSO<Swarm>- Returns:
- the array of indices of the selected feature subset
-
evaluateFeatures
public void evaluateFeatures()Starts the feature selection process by particle swarm optimization version 4-2(PSO(4-2)) method- Specified by:
evaluateFeaturesin classFeatureSelection
-