Skip to content

kennethleungty/Simulated-Annealing-Feature-Selection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feature Selection with Simulated Annealing in Python, Clearly Explained

Concepts and Python implementation of the global search algorithm to select the best features for machine learning


TowardsDataScience article: https://towardsdatascience.com/feature-selection-with-simulated-annealing-in-python-clearly-explained-1808db14f8fa


Context

Feature selection is a key step in machine learning as it boosts computational efficiency and predictive performance by keeping only the most relevant predictors.

Beyond the popular supervised feature selection classes like filter and wrapper methods, global search methods like simulated annealing are also powerful techniques at our disposal.

In this project, we delve into the theory and application of simulated annealing for feature selection.


Project Structure

  • data: Titanic dataset (raw and processed)
  • images: Set of images and visualizations used to demonstrate algorithm
  • notebooks: Jupyter notebooks for the different steps of the project i.e. data pre-processing, baseline modeling, and running of feature selection with simulated annealing algorithm
  • results: CSV files of the output from algorithm runs
  • src: Python scripts for simulated annealing algorithm for feature selection
    • main.py: Main script containing algorithm. In CLI, cd into src folder, then execute python main.py
    • utils.py: Utils script containing ML model function (i.e. random forest classifier)

References