Class BPSO
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.wrapper.WrapperApproach
unifeat.featureSelection.wrapper.PSOBasedMethods.BasicPSO<Swarm>
unifeat.featureSelection.wrapper.PSOBasedMethods.BPSO.BPSO
This java class is used to implement feature selection method based on binary
particle swarm optimization (BPSO) 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 binary particle swarm optimization (BPSO) methodMethods inherited from class unifeat.featureSelection.wrapper.WrapperApproach
loadDataSet, loadDataSet, newMethod, originalFeatureSetMethods inherited from class unifeat.featureSelection.FeatureSelection
getSelectedFeatureSubset, setNumSelectedFeature
-
Constructor Details
-
BPSO
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 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 binary particle swarm optimization (BPSO) method- Specified by:
evaluateFeaturesin classFeatureSelection
-