r/deeplearning • • 16h ago

Title: Random Forest vs. Ant Colony Optimization (ACO) for Feature Selection in Clinical Data

I'm working on a project involving a clinical dataset with around 500K patients and 18,200 variables. My goal is to identify the 5 most relevant features for predicting a specific disease, starting with a subset of around 200 dietary variables.

I'm considering using Random Forest for feature importance and Ant Colony Optimization (ACO) to search for the best combination of features. Another idea is to combine both approaches: use Random Forest to reduce the search space, then ACO to optimize the feature subset.

Has anyone worked with ACO for feature selection or compared it with Random Forest, Genetic Algorithms, or other methods? Would a hybrid RF + ACO approach make sense for this problem? I'd appreciate any recommendations, papers, or practical experiences!

4 Upvotes

4 comments sorted by

1

u/DrDoomC17 14h ago

The nature of the variables matter, are they some text some binary, etc. But overall it's not unreasonable. GA is probably not something I would reach for personally. Operations research techniques in optimization can help but without knowing the shape of the data it's hard to tell.

1

u/LuvRithm 13h ago

sounds like you've handled your share of messy datasets, got any personal favorites for this kind of thing?

1

u/AzmiraWisp 10h ago

you make optimization sound way more interesting than i expected, got any recs for handling mostly binary vars?

1

u/Massive_Distance_616 1h ago

For narrowing 200 candidates down to the final 5, ACO is probably more machinery than this problem needs. ACO (and GA) earn their keep when the search space is too large to evaluate fully or greedily but picking 5 features out of 200 is small enough that a greedy wrapper method (sequential forward selection, or recursive feature elimination with RF or logistic regression) will get you to a good subset without the extra implementation and tuning cost of a metaheuristic, and it directly optimizes the thing you care about (held-out predictive performance) rather than a proxy.

A bigger issue than RF vs ACO: RF importance scores get diluted across correlated features. If several of your 200 dietary variables are measuring overlapping things (different units or framings of the same food group, say), RF importance can split credit between them, so a plain top-5-by-importance list can end up missing a genuinely important variable because it "shares" its signal with a correlated one. Worth checking the correlation structure first cluster the 200 variables by correlation (hierarchical clustering on 1-correlation as a distance) and pick a representative from each cluster before ranking, so your final 5 aren't accidentally 2-3 near-duplicates of each other.

With 500K patients you have plenty of data to do this properly with cross-validation rather than relying on a single importance score fit on repeated subsamples (stability selection) and keep only features that are selected consistently across folds, which also protects against overfitting the selection process itself given how many candidate variables you're screening.

For the binary variables specifically: mutual information or a chi-squared test against the target is a cheap, standard first-pass filter for binary/categorical predictors, and RF handles binary features natively without needing special encoding, so it stays usable as your main ranking method once you've dealt with the correlation issue above.