Skip to content

Feature selection functions (1) using the multi-collinearity matrix and recursively proceeding to a spearman threshold and (2) using Forward Stepwise Selection running on an ensemble sklearner (with options for HPO).

License

Notifications You must be signed in to change notification settings

daniel-furman/RecFeatureSelect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

RecFeatureSelect


Feature selection via recursive removal of the most correlated pair. The feature importance scores are used as the rankings, deciding which variable to drop at each call.

Final covariance matrix with Method 2 for r < 0.85


pip import RecFeatureSelect
from RecFeatureSelect import feature_selector

  • The main function can be found from the source folder, RecFeatureSelect.
  • The input data consists of the original covariance matrix, the feature importance scores, a spearman correlation threshold, and the raw data.
  • After the run the function will save the final covariance matrix to file as "cov.csv". All correlations will be less than the input threshold.

  • RecFeatureSelect - the library code itself
  • docs - instructions for import and basic use
  • LICENSE - the MIT license, which applies to this package
  • README.md - the README file, which you are now reading
  • requirements.txt - prerequisites to install this package, used by pip
  • setup.py - installer script
  • tests/ - unit tests

Longer Description:


This function selects de-correlated features for a modeling experiment by filtering the most similar pair at each call. The algorithm reaches the stopping case when all pairs of features are below the Spearman's statistic threshold. The feature importances are used as the ranking.

About

Feature selection functions (1) using the multi-collinearity matrix and recursively proceeding to a spearman threshold and (2) using Forward Stepwise Selection running on an ensemble sklearner (with options for HPO).

Topics

Resources

License

Stars

Watchers

Forks

Languages