public class BPSO extends BasicPSO<Swarm>
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:
  • Constructor Details

    • BPSO

      public BPSO(Object... arguments)
      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 which path 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, and kFolds is 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:
      createSelectedFeatureSubset in class BasicPSO<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:
      evaluateFeatures in class FeatureSelection