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

    • PSO42

      public PSO42(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, theta) 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, kFolds is the number of equal sized subsamples that is used in k-fold cross validation, and theta is 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:
      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 particle swarm optimization version 4-2(PSO(4-2)) method
      Specified by:
      evaluateFeatures in class FeatureSelection