I've just came across these two algorithms and I was wondering whether there are any available versions for ACO and PSO as ranking-based feature selection approaches?
You can get a demo version of ACO based feature selection for classification. Here the link https://www.mathworks.com/matlabcentral/fileexchange/71989-ant-colony-optimization-for-feature-selection
Jingwei Too thank you for sharing the source code. I did run it and got several outputs as described in the algorithm but since I need to rank each (selected) feature, I've been wondering, if the information stored in the matrix 'Sfeat' can tells me which feature has better discrimination power when used in a classification task (for instance by computing and sorting the magnitude on each column).
The matrix 'sFeat' is the selected features. If you wish to know which feature is selected, you may refer to 'Sf' and it will show which feature has been selected.
However, if you wish to know which feature has better discriminate power, you need to use filter method instead of using wrapper method. Another way is you can change the fitness function in my program with another fitness function that can calculate the rank (example: mutual information, correlation).
Jingwei Too, what I've noticed from your source code in the 'jACO' function at line 88, is that, the function 'unique' sorts the indices of the selected features stored in the vector 'Xgb'. For instance, if I decided to select all the (34) features from the template dataset you've provided, after running the instruction Sf=unique(Xgb) I'd get all the features sorted as follow:
Instead, if I ran the same command like Sf=unique(Xgb,'stable'), I'd get the selected feature sorted in a different way, by preserving the order stored in the vector 'Xgb'
I use the "unique" is just to arrange the feature index in ascending order, but not to rearrange the feature index toward discriminate power. Hence, the the function "unique" does not effect the result.
In sum, it is not conceivable. You need to apply ranking or filter method to know which feature has better discriminate power...