Class BasicColony<AntType>

java.lang.Object
unifeat.featureSelection.wrapper.ACOBasedMethods.BasicColony<AntType>
Type Parameters:
AntType - the type of ant implemented in ACO algorithm
Direct Known Subclasses:
Colony

public abstract class BasicColony<AntType> extends Object
The abstract class contains the main methods and fields that are used in all ACO-based feature selection methods. This class is used to implement a colony of ants in ACO algorithm.
Author:
Sina Tabakhi
  • Field Details

    • colony

      protected AntType[] colony
    • fitnessEvaluator

      public static FitnessEvaluator fitnessEvaluator
    • graphRepresentation

      public static GraphRepresentation graphRepresentation
    • NUM_ORIGINAL_FEATURE

      public static int NUM_ORIGINAL_FEATURE
    • COLONY_SIZE

      protected static int COLONY_SIZE
    • INIT_PHEROMONE_VALUE

      protected static double INIT_PHEROMONE_VALUE
    • ALPHA

      protected static double ALPHA
    • BETA

      protected static double BETA
    • RHO

      protected static double RHO
  • Constructor Details

    • BasicColony

      public BasicColony(Class<AntType> ant)
      Initializes the parameters
      Parameters:
      ant - the type of ant implemented in ACO algorithm
  • Method Details

    • initialization

      public abstract void initialization()
      This method initializes the problem parameters.
    • setInitialState

      public abstract void setInitialState()
      This method places any ant randomly to one feature as their initial states.
    • evaluateCurrentSolution

      public abstract Criteria evaluateCurrentSolution(int antIndex)
      This method evaluates the fitness of each ant in the colony by predefined fitness function.
      Parameters:
      antIndex - index of the ant in the colony
      Returns:
      Criteria values of the fitness function
      See Also:
    • operateStateTransitionRule

      public abstract void operateStateTransitionRule(int antIndex)
      This method selects the next state and adds it to the current selected feature subset by using state transition rule that is combination of heuristic desirability and pheromone levels.
      Parameters:
      antIndex - index of the ant in the colony
    • constructSolution

      public abstract void constructSolution()
      This method constructs solutions completely of each ant in the colony by applying state transition rule repeatedly.
    • operatePheromoneUpdateRule

      public abstract void operatePheromoneUpdateRule()
      This method updates the current pheromone values by decreasing pheromone concentrations and then deposit the quantity of pheromone by ants.
    • getBestAnt

      public abstract AntType getBestAnt()
      This method returns the best ant in the colony
      Returns:
      the best ant in the colony
    • toString

      public String toString()
      Returns a string representation of the colony.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the colony.