Class UFSACO
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.filter.FilterApproach
unifeat.featureSelection.filter.unsupervised.UFSACO
This java class is used to implement the unsupervised feature selection based
 on ant colony optimization (UFSACO) method.
- Author:
- Sina Tabakhi
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final doubleprivate int[]private final doubleprivate final doubleprivate int[]private final doubleprivate final intprivate intprivate intprivate double[]private final doubleprivate double[]private boolean[][]private intFields inherited from class unifeat.featureSelection.FeatureSelectionnumClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidStarts the feature selection process by unsupervised feature selection based on ant colony optimization (UFSACO) methodprivate static intfindIndex(int index1, int index2) Finds index in new Data Structure(Symmetric Matrix)private intgreedyRule(int indexAnt) Greedy state transition ruleprivate voidUpdates intensity of pheromone valuesprivate intprobRule(int indexAnt) Probability state transition ruleprivate voidPlaces the ants randomly on the graph nodes as their starting nodesprivate intstateTransitionRules(int indexAnt) Chooses the next feature among unvisited features according to the state transition rulesvalidate()This method returns the potential errors in the input parameters.Methods inherited from class unifeat.featureSelection.filter.FilterApproachnewMethodMethods inherited from class unifeat.featureSelection.FeatureSelectiongetSelectedFeatureSubset, loadDataSet, loadDataSet, setNumSelectedFeature
- 
Field Details- 
INIT_PHEROMONE_VALUEprivate final double INIT_PHEROMONE_VALUE
- 
MAX_ITERATIONprivate final int MAX_ITERATION
- 
NUM_ANTSprivate int NUM_ANTS
- 
NUM_FEAT_OF_ANTprivate int NUM_FEAT_OF_ANT
- 
TEMP_NUM_FEAT_OF_ANTprivate int TEMP_NUM_FEAT_OF_ANT
- 
DECAY_RATEprivate final double DECAY_RATE
- 
BETAprivate final double BETA
- 
PROB_CHOOSE_EQUATIONprivate final double PROB_CHOOSE_EQUATION
- 
simValuesprivate double[] simValues
- 
pheromoneValuesprivate double[] pheromoneValues
- 
featureCounterprivate int[] featureCounter
- 
tabuListprivate boolean[][] tabuList
- 
currentStateprivate int[] currentState
- 
ERROR_SIMILARITYprivate final double ERROR_SIMILARITY- See Also:
 
 
- 
- 
Constructor Details- 
UFSACOInitializes the parameters- Parameters:
- arguments- array of parameters contains (- sizeSelectedFeatureSubset,- initPheromone,- numIterations,- numAnt,- numFeatureOfAnt,- evaporationRate,- betaParameter,- q0_Parameter) in which- sizeSelectedFeatureSubsetis the number of selected features,- initPheromoneis the initial value of the pheromone,- numIterationsis the maximum number of iteration,- numAntis the number of ants,- numFeatureOfAntis the number of selected features by each ant in each iteration,- evaporationRateis the evaporation rate of the pheromone,- betaParameteris the beta parameter in the state transition rule, and- q0_Parameteris the q0 parameter in the state transition rule
 
- 
UFSACOpublic UFSACO(int sizeSelectedFeatureSubset, double initPheromone, int numIterations, int numAnt, int numFeatureOfAnt, double evaporationRate, double betaParameter, double q0_Parameter) Initializes the parameters- Parameters:
- sizeSelectedFeatureSubset- the number of selected features
- initPheromone- the initial value of the pheromone
- numIterations- the maximum number of iteration
- numAnt- the number of ants
- numFeatureOfAnt- the number of selected features by each ant in each iteration
- evaporationRate- the evaporation rate of the pheromone
- betaParameter- the beta parameter in the state transition rule
- q0_Parameter- the q0 parameter in the state transition rule
 
 
- 
- 
Method Details- 
findIndexprivate static int findIndex(int index1, int index2) Finds index in new Data Structure(Symmetric Matrix)- Parameters:
- index1- index of the row
- index2- index of the column
- Returns:
- the index in new Data Structure
 
- 
setStartNodeprivate void setStartNode()Places the ants randomly on the graph nodes as their starting nodes
- 
greedyRuleprivate int greedyRule(int indexAnt) Greedy state transition rule- Parameters:
- indexAnt- index of the ant
- Returns:
- the index of the selected feature
 
- 
probRuleprivate int probRule(int indexAnt) Probability state transition rule- Parameters:
- indexAnt- index of the ant
- Returns:
- the index of the selected feature
 
- 
stateTransitionRulesprivate int stateTransitionRules(int indexAnt) Chooses the next feature among unvisited features according to the state transition rules- Parameters:
- indexAnt- the index of the ant
- Returns:
- the index of the selected feature
 
- 
pheromoneUpdatingRuleprivate void pheromoneUpdatingRule()Updates intensity of pheromone values
- 
evaluateFeaturespublic void evaluateFeatures()Starts the feature selection process by unsupervised feature selection based on ant colony optimization (UFSACO) method- Specified by:
- evaluateFeaturesin class- FeatureSelection
 
- 
validateThis method returns the potential errors in the input parameters.- Overrides:
- validatein class- FeatureSelection
- Returns:
- a string contains the information about incorrect parameters
 
 
-