Class HPSO_LSPanel

All Implemented Interfaces:
ActionListener, ItemListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class HPSO_LSPanel extends BasicPSOPanel
This java class is used to create and show a panel for the parameter settings of the hybrid particle swarm optimization method using local search (HPSO-LS).
Author:
Sina Tabakhi
See Also:
  • Constructor Details

    • HPSO_LSPanel

      public HPSO_LSPanel()
      Creates new form HPSO_LSPanel. This method is called from within the constructor to initialize the form.
  • Method Details

    • keyReleased

      public void keyReleased(KeyEvent e)
      The listener method for receiving keyboard events (keystrokes). Invoked when a key has been released.
      Specified by:
      keyReleased in interface KeyListener
      Overrides:
      keyReleased in class BasicPSOPanel
      Parameters:
      e - an action event
    • btn_okActionPerformed

      protected void btn_okActionPerformed(ActionEvent e)
      This method sets an action for the btn_ok button.
      Overrides:
      btn_okActionPerformed in class BasicPSOPanel
      Parameters:
      e - an action event
    • getEpsilon

      public double getEpsilon()
      This method returns the epsilon value.
      Returns:
      the epsilon parameter
    • setEpsilon

      public void setEpsilon(double epsilon)
      This method sets the epsilon value.
      Parameters:
      epsilon - the epsilon value
    • getAlpha

      public double getAlpha()
      This method returns the alpha value.
      Returns:
      the alpha parameter
    • setAlpha

      public void setAlpha(double alpha)
      This method sets the alpha value.
      Parameters:
      alpha - the alpha value
    • setDefaultValue

      public void setDefaultValue()
      Sets the default values of the HPSO_LS parameters
      Overrides:
      setDefaultValue in class BasicPSOPanel
    • setUserValue

      public void setUserValue(ClassifierType classifierType, Object selectedClassifierPan, int numIteration, int populationSize, double inertiaWeight, double c1, double c2, double startPosInterval, double endPosInterval, double minVelocity, double maxVelocity, int kFolds, double epsilon, double alpha)
      Sets the last values of the HPSO_LS parameters entered by user
      Parameters:
      classifierType - the selected classifier type
      selectedClassifierPan - the selected classifier panel
      numIteration - the maximum number of allowed iterations that algorithm repeated
      populationSize - the size of population of candidate solutions
      inertiaWeight - the inertia weight in the velocity updating rule
      c1 - the acceleration constant in the velocity updating rule
      c2 - the acceleration constant in the velocity updating rule
      startPosInterval - the position interval start value of each particle
      endPosInterval - the position interval end value of each particle
      minVelocity - the velocity interval end value of each particle
      maxVelocity - the velocity interval end value of each particle
      kFolds - the number of equal sized subsamples that is used in k-fold cross validation
      epsilon - the epsilon parameter used in the subset size determining scheme
      alpha - the alpha parameter used in the local search operation (control similar/dissimilar)