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

public class Particle extends BasicParticle<Double,Double>
This java class is used to represent a particle in continuous particle swarm optimization (CPSO) method in which the type of position and velocity vectors are double.
Author:
Sina Tabakhi
See Also:
  • Field Details

    • THETA

      public static double THETA
  • 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<Double,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<Double,Double>
      Returns:
      the array of indices of the selected features by the particle