featurewiz
π₯ FeatureWiz, the ultimate feature selection library is powered by the renowned Minimum Redundancy Maximum Relevance (MRMR) algorithm. Learn more about it below.

Table of Contents
Latest Update (Jan 2025)
- featurewiz is now upgraded to version 0.6
Anything above this version now runs on Python 3.12 or greater and also runs on pandas 2.0.
- this is a huge upgrade to those working in Colab, Kaggle and other latest kernels.
- Please make sure you check the `requirements.txt` file to know which versions are recommended.
Citation
If you use featurewiz in your research project or paper, please use the following format for citations:
"Seshadri, Ram (2020). GitHub - AutoViML/featurewiz: Use advanced feature engineering strategies and select the best features from your data set fast with a single line of code. source code: https://github.com/AutoViML/featurewiz"
Current citations for featurewiz
Google Scholar citations for featurewiz
Highlights
featurewiz is the best feature selection library for boosting your machine learning performance with minimal effort and maximum relevance using the famous MRMR algorithm.
What Makes FeatureWiz Stand Out? π
βοΈ Automatically select the most relevant features without specifying a number
π Provides the fastest and best implementation of the MRMR algorithm
π― Provides a built-in transformer (lazytransform library) that converts all features to numeric
π Includes deep learning models such as Variational Auto Encoders to capture complex interactions in your data
π Provides feature engineering in addition to feature selection - all with one single API call!
Simple tips for success using featurewiz π‘
π First create additional features using the feature engg module
π Compare featurewiz against other feature selection methods for best performance
βοΈ Avoid overfitting by cross-validating your results as shown here
π― Try adding auto-encoders for additional features that may help boost performance
Feature Engineering
Create new features effortlessly with a single line of code! featurewiz enables you to generate hundreds of interaction, group-by, target-encoded features and higher order features, eliminating the need for expert-level knowledge to create your own features. Now you can create even deep learning based features such as Variational Auto Encoders to capture complex interactions hidden among your features. See the latest page for more information on this amazing feature.
What is MRMR?
featurewiz provides one of the best automatic feature selection algorithms, MRMR, as described by wikipedia in this page as follows: "The MRMR feature selection algorithm has been found to be more powerful than other feature selection algorithms such as Boruta".
In addition, other researchers have compared MRMR against multiple feature selection algorithms and found MRMR to be the best.

How does MRMR feature selection work?π
After creating new features, featurewiz uses the MRMR algorithm to answer crucial questions: Which features are important? Are they redundant or mutually-correlated? Will your model suffer from or benefit from adding all features? To answer these questions, featurewiz uses two crucial steps in MRMR:
βοΈ The SULOV Algorithm: SULOV means "Searching for Uncorrelated List of Variables". It is a fast algorithm that removes mutually correlated features so that you're left with only the most non-redundant (un-correlated) features. It uses the Mutual Information Score to accomplish this feat.
βοΈ Recursive XGBoost: Second, featurewiz uses XGBoost's feature importance scores by selecting smaller and smaller feature sets repeatedly to identify the most relevant features for your task among all the variables remaining after SULOV algorithm.
Advanced Feature Engineering Options
featurewiz extends traditional feature selection to the realm of deep learning using Auto Encoders, including Denoising Auto Encoders (DAEs), Variational Auto Encoders (VAEs), CNN's (Convolutional Neural Networks) and GAN's (Generative Adversarial Networks) for additional feature extraction, especially on imbalanced datasets. Just set the 'feature_engg' flag to 'VAE_add' or 'DAE_add' to create these additional features.

In addition, we include:
A variety of category encoders like HashingEncoder, SumEncoder, PolynomialEncoder, BackwardDifferenceEncoder, OneHotEncoder, HelmertEncoder, OrdinalEncoder, and BaseNEncoder.
The ability to add interaction features (e.g., x1x2, x2x3, x1^2), polynomial (X**2, X**3) and group by features, and target encoding features.
Examples and Updates
Workings
featurewiz has two major modules to transform your Data Science workflow:
1. Feature Engineering Module

Advanced Feature Creation: use Deep Learning based Auto Encoders and GAN's to extract features to add to your data. These powerful capabilities will help you in solving your toughest problems.
Options for Enhancement: Use "interactions", "groupby", or "target" flags to enable advanced feature engineering techniques.
Kaggle-Ready: Designed to meet the high standards of feature engineering required in competitive data science, like Kaggle.
Efficient and User-Friendly: Generate and sift through thousands of features, selecting only the most impactful ones for your model.

2. Feature Selection Module
MRMR Algorithm: Employs Minimum Redundancy Maximum Relevance (MRMR) for effective feature selection.
SULOV Method: Stands for 'Searching for Uncorrelated List of Variables', ensuring low redundancy and high relevance in feature selection.
Addressing Key Questions: Helps interpret new features, assess their importance, and evaluate the model's performance with these features.
Optimal Feature Subset: Uses Recursive XGBoost in combination with SULOV to identify the most critical features, reducing overfitting and improving model interpretability.
Comparing featurewiz to Boruta:
Featurewiz uses what is known as a Minimal Optimal algorithm such as MRMR while Boruta uses an All-Relevant approach. To understand how featurewiz's MRMR approach differs Boruta's 'All-Relevant' approach for best feature selection you need to study the chart below. It shows how the SULOV algorithm performs MRMR feature selection which provides a smaller feature set compared to Boruta which uses a bigger feature set.
One of the weaknesses of Boruta is that it contains redundant features (highly correlated features) which will hamper model performance while featurewiz doesn't.

Transform your feature engineering and selection process with featurewiz - the tool that brings expert-level capabilities to your fingertips!
Working
featurewiz performs feature selection in 2 steps. Each step is explained below.
The working of the SULOV algorithm is as follows:
- Find all the pairs of highly correlated variables exceeding a correlation threshold (say absolute(0.7)).
- Then find their MIS score (Mutual Information Score) to the target variable. MIS is a non-parametric scoring method. So its suitable for all kinds of variables and target.
- Now take each pair of correlated variables (using Pearson coefficient higher than the threshold above), and then eliminate the feature with the lower MIS score from the pair. Do this repeatedly with each pair until no feature pair is left to analyze.
- Whatβs left after this step are the features with the highest Information score and the least Pearson correlation with each other.

The working of the Recursive XGBoost is as follows:
Once SULOV has selected variables that have high mutual information scores with the least correlation among them, featurewiz uses XGBoost to repeatedly find the best features among the remaining variables after SULOV.
- Select all variables in the data set and the full data split into train and valid sets.
- Find top X features (could be 10) on train using valid for early stopping (to prevent over-fitting)
- Then take the next set of vars and find top X
- Do this 5 times. Combine all selected features and de-duplicate them.

Tips
Here are some additional tips for ML engineers and data scientists when using featurewiz:
- How to cross-validate your results: When you use featurewiz, we automatically perform multiple rounds of feature selection using permutations on the number of columns. However, you can perform feature selection using permutations of rows as follows in cross_validate using featurewiz.
- Use multiple feature selection tools: It is a good idea to use multiple feature selection tools and compare the results. This will help you to get a better understanding of which features are most important for your data.
- Don't forget to use Auto Encoders!: Autoencoders are like skilled artists who can draw a quick sketch of a complex picture. They learn to capture the essence of the data and then recreate it with as few strokes as possible. This process helps in understanding and compressing data efficiently.
- Don't overfit your model: It is important to avoid overfitting your model to the training data. Overfitting occurs when your model learns the noise in the training data, rather than the underlying signal. To avoid overfitting, you can use regularization techniques, such as lasso or elasticnet.
- Start with a small number of features: When you are first starting out, it is a good idea to start with a small number of features. This will help you to avoid overfitting your model. As you become more experienced, you can experiment with adding more features.
Install
Prerequisites:
- featurewiz is built using xgboost, dask, numpy, pandas and matplotlib. It should run on most Python 3 Anaconda installations. You won't have to import any special libraries other than "dask", "XGBoost" and "networkx" library. Optionally, it uses LightGBM for fast modeling, which it installs automatically.
- We use "networkx" library for charts and interpretability.
But if you don't have these libraries, featurewiz will install those for you automatically.
In Kaggle notebooks, you need to install featurewiz like this (otherwise there will be errors):
!pip install featurewiz
!pip install Pillow==9.0.0
!pip install xlrd β ignore-installed β no-deps
!pip install executing>0.10.0
To install from source:
cd <featurewiz_Destination>
git clone git@github.com:AutoViML/featurewiz.git
# or download and unzip https://github.com/AutoViML/featurewiz/archive/master.zip
conda create -n <your_env_name> python=3.7 anaconda
conda activate <your_env_name> # ON WINDOWS: `source activate <your_env_name>`
cd featurewiz
pip install -r requirements.txt
Good News: You can install featurewiz on Colab and Kaggle easily in 2 steps!
As of June 2022, thanks to arturdaraujo, featurewiz is now available on conda-forge. You can try:
conda install -c conda-forge featurewiz
If the above conda install fails, you can try installing featurewiz this way:
Install featurewiz using git+
!pip install git+https://github.com/AutoViML/featurewiz.git
Usage
There are two ways to use featurewiz.