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
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 Summary
Modifier and TypeFieldDescriptionprotected static double
protected static double
protected AntType[]
protected static int
static FitnessEvaluator
static GraphRepresentation
protected static double
static int
protected static double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
This method constructs solutions completely of each ant in the colony by applying state transition rule repeatedly.abstract Criteria
evaluateCurrentSolution
(int antIndex) This method evaluates the fitness of each ant in the colony by predefined fitness function.abstract AntType
This method returns the best ant in the colonyabstract void
This method initializes the problem parameters.abstract void
This method updates the current pheromone values by decreasing pheromone concentrations and then deposit the quantity of pheromone by ants.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.abstract void
This method places any ant randomly to one feature as their initial states.toString()
Returns a string representation of the colony.
-
Field Details
-
colony
-
fitnessEvaluator
-
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
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
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
This method returns the best ant in the colony- Returns:
- the best ant in the colony
-
toString
Returns a string representation of the colony.
-