java.lang.Object
unifeat.featureSelection.wrapper.PSOBasedMethods.BasicParticle<Boolean,Double>
unifeat.featureSelection.wrapper.PSOBasedMethods.HPSO_LS.Particle

public class Particle extends BasicParticle<Boolean,Double>
This java class is used to represent a particle in hybrid particle swarm optimization method using local search (HPSO-LS) in which the type of position vector is boolean and the type of velocity vector is double.
Author:
Sina Tabakhi
See Also:
  • Constructor Details

    • Particle

      public Particle(int dimension)
      Initializes the parameters
      Parameters:
      dimension - the dimension of problem which equals to total number of features in the dataset
  • Method Details

    • numSelectedFeatures

      public int numSelectedFeatures()
      This method returns the number of selected features by the particle based on position vector.
      Specified by:
      numSelectedFeatures in class BasicParticle<Boolean,Double>
      Returns:
      number of selected features by the particle
    • selectedFeaturesSubset

      public int[] selectedFeaturesSubset()
      This method returns the indices of selected features by the particle based on position vector.
      Specified by:
      selectedFeaturesSubset in class BasicParticle<Boolean,Double>
      Returns:
      the array of indices of the selected features by the particle