← Open Source
smazzanti

mrmr

mRMR (minimum-Redundancy-Maximum-Relevance) for automatic feature selection at scale.

Model DevelopmentClassical MLPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
631
Stars
91
Forks
+0
This week
8
Contributors
Created 2021-04-16 · Updated 2026-10-02 · #15805 today
Top developers
smazzantiapachavesbkermorvan-cigp

smazzanti/mrmr is ranked 15,805 with 631 stars.

Same-category comparison

smazzanti/mrmr is ranked 15,805 among these 8 peers; omriav/blended-latent-diffusion is ranked 15,804.

Same-category comparison
NameRankMetrics
shamangary/FSA-Net15,796
Language:
Python
Stars:
632
Forks:
154
Description:
[CVPR19] FSA-Net: Learning Fine-Grained Structure Aggregation for Head Pose Estimation from a Single Image.
tue-mps/eomt15,799
Language:
Jupyter Notebook
Stars:
632
Forks:
64
Description:
[CVPR 2025 Highlight] Official code and models for Encoder-only Mask Transformer (EoMT).
gugarosa/opytimizer15,802
Language:
Python
Stars:
631
Forks:
43
Description:
🐦 Opytimizer is a Python library consisting of meta-heuristic optimization algorithms.
omriav/blended-latent-diffusion15,804
Language:
Jupyter Notebook
Stars:
631
Forks:
37
Description:
Official implementation for "Blended Latent Diffusion" [SIGGRAPH 2023].
PRBonn/PIN_SLAM15,809
Language:
Python
Stars:
630
Forks:
82
Description:
📍PIN-SLAM: LiDAR SLAM Using a Point-Based Implicit Neural Representation for Achieving Global Map Consistency [TRO 24].
facebookresearch/kill-the-bits15,816
Language:
Python
Stars:
630
Forks:
121
Description:
Code for: "And the bit goes down: Revisiting the quantization of neural networks".
google-research/ravens15,817
Language:
Python
Stars:
630
Forks:
108
Description:
Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet. Transporter Nets, CoRL 2020.
timomernick/pytorch-capsule15,821
Language:
Python
Stars:
630
Forks:
100
Description:
Pytorch implementation of Hinton's Dynamic Routing Between Capsules.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryClassical ML
Stars631
Forks91
Contributors8
Created date2021-04-16
Updated date2026-10-02
Stars in 1 day0
Stars in 7 days0
Rank15,805
Previous rank15,608
Rank change-197
7-day stars rank15,191
Previous 7-day stars rank15,196
7-day stars rank change5
Total stars rank16,148
Previous total stars rank16,122
Total stars rank change-26
README summary

What is mRMR *mRMR*, which stands for "minimum Redundancy - Maximum Relevance", is a feature selection algorithm. Why is it unique The peculiarity of *mRMR* is that it is a **minimal-optimal** feature selection algorithm. This means it is designed to find the smallest relevant subset of features for a given Machine Learning task. Selecting the minimum number of useful features is desirable for many reasons: memory consumption, time required, performance, explainability of results. This is why a minimal-optimal method

such as *mrmr* is often preferable. On the contrary, the majority of other methods (for instance, Boruta or Positive-Feature-Importance) are classified as **all-relevant**, since they identify all the features that have some kind of relationship with the target variable. When to use mRMR Due to its efficiency, *mRMR* is ideal for practical ML applications, where it is necessary to perform feature selection frequently and automatically, in a relatively small amount of time. For instance, in **2019**, **Uber

** engineers published a paper describing how they implemented *mRMR* in their marketing machine learning platform Maximum Relevance and Minimum Redundancy Feature Selection Methods for a Marketing Machine Learning Platform. How to install this package You can install this package in your environment via pip: And then import it in Python through: How to use this package This package is designed to do *mRMR* selection through different tools, depending on your needs and constraints. Currently, the following tools are supported (others

will be added): **Pandas** **Polars** **Spark** **Google BigQuery** The package has a module for each supported tool. Each module has *at least* these 2 functions: , for feature selection when the target variable is categorical (binary or multiclass). , for feature selection when the target variable is numeric. Pandas example You have a Pandas DataFrame ( ) and a Series which is your target variable ( ). You want to select the best features to make predictions on . Note: the output of mrmr_classif is a

list containing K selected features. This is a **ranking**, therefore, if you want to make a further selection, take the first elements of this list. Google BigQuery example Reference For an easy-going introduction to *mRMR*, read my article on **Towards Data Science**: “MRMR” Explained Exactly How You Wished Someone Explained to You. Also, this article describes an example of *mRMR* used on the world famous **MNIST** dataset: Feature Selection: How To Throw Away 95% of Your Data and Get

95% Accuracy. *mRMR* was born in **2003**, this is the original paper: Minimum Redundancy Feature Selection From Microarray Gene Expression Data. Since then, it has been used in many practical applications, due to its simplicity and effectiveness. For instance, in **2019**, **Uber** engineers published a paper describing how they implemented MRMR in their marketing machine learning platform Maximum Relevance and Minimum Redundancy Feature Selection Methods for a Marketing Machine Learning Platform.

Frequently asked questions

How many stars and forks are recorded?

smazzanti/mrmr has 631 stars and 91 forks.

What is the repository rank?

smazzanti/mrmr is ranked 15,805.

What language and category are recorded?

smazzanti/mrmr has 631 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

smazzanti/mrmr is compared with omriav/blended-latent-diffusion, ranked 15,804 with 631 stars.

README

What is mRMR

mRMR, which stands for "minimum Redundancy - Maximum Relevance", is a feature selection algorithm.

Why is it unique

The peculiarity of mRMR is that it is a minimal-optimal feature selection algorithm.

This means it is designed to find the smallest relevant subset of features for a given Machine Learning task.

Selecting the minimum number of useful features is desirable for many reasons:

  • memory consumption,
  • time required,
  • performance,
  • explainability of results.

This is why a minimal-optimal method such as mrmr is often preferable.

On the contrary, the majority of other methods (for instance, Boruta or Positive-Feature-Importance) are classified as all-relevant, since they identify all the features that have some kind of relationship with the target variable.

When to use mRMR

Due to its efficiency, mRMR is ideal for practical ML applications, where it is necessary to perform feature selection frequently and automatically, in a relatively small amount of time.

For instance, in 2019, Uber engineers published a paper describing how they implemented mRMR in their marketing machine learning platform Maximum Relevance and Minimum Redundancy Feature Selection Methods for a Marketing Machine Learning Platform.

How to install this package

You can install this package in your environment via pip:

pip install mrmr_selection

And then import it in Python through:

import mrmr

How to use this package

This package is designed to do mRMR selection through different tools, depending on your needs and constraints.

Currently, the following tools are supported (others will be added):

  • Pandas
  • Polars
  • Spark
  • Google BigQuery

The package has a module for each supported tool. Each module has at least these 2 functions:

  • mrmr_classif, for feature selection when the target variable is categorical (binary or multiclass).
  • mrmr_regression, for feature selection when the target variable is numeric.

Let's see some examples.

1. Pandas example

You have a Pandas DataFrame (X) and a Series which is your target variable (y). You want to select the best K features to make predictions on y.

# create some pandas data
import pandas as pd
from sklearn.datasets import make_classification
X, y = make_classification(n_samples = 1000, n_features = 50, n_informative = 10, n_redundant = 40)
X = pd.DataFrame(X)
y = pd.Series(y)

# select top 10 features using mRMR
from mrmr import mrmr_classif
selected_features = mrmr_classif(X=X, y=y, K=10)

Note: the output of mrmr_classif is a list containing K selected features. This is a ranking, therefore, if you want to make a further selection, take the first elements of this list.

2. Polars example

# create some polars data
import polars
data = [(1.0, 1.0, 1.0, 7.0, 1.5, -2.3), 
        (2.0, None, 2.0, 7.0, 8.5, 6.7), 
        (2.0, None, 3.0, 7.0, -2.3, 4.4),
        (3.0, 4.0, 3.0, 7.0, 0.0, 0.0),
        (4.0, 5.0, 4.0, 7.0, 12.1, -5.2)]
columns = ["target", "some_null", "feature", "constant", "other_feature", "another_feature"]
df_polars = polars.DataFrame(data=data, schema=columns)

# select top 2 features using mRMR
import mrmr
selected_features = mrmr.polars.mrmr_regression(df=df_polars, target_column="target", K=2)

3. Spark example

# create some spark data
import pyspark
session = pyspark.sql.SparkSession(pyspark.context.SparkContext())
data = [(1.0, 1.0, 1.0, 7.0, 1.5, -2.3), 
        (2.0, float('NaN'), 2.0, 7.0, 8.5, 6.7), 
        (2.0, float('NaN'), 3.0, 7.0, -2.3, 4.4),
        (3.0, 4.0, 3.0, 7.0, 0.0, 0.0),
        (4.0, 5.0, 4.0, 7.0, 12.1, -5.2)]
columns = ["target", "some_null", "feature", "constant", "other_feature", "another_feature"]
df_spark = session.createDataFrame(data=data, schema=columns)

# select top 2 features using mRMR
import mrmr
selected_features = mrmr.spark.mrmr_regression(df=df_spark, target_column="target", K=2)

4. Google BigQuery example

# initialize BigQuery client
from google.cloud.bigquery import Client
bq_client = Client(credentials=your_credentials)

# select top 20 features using mRMR
import mrmr
selected_features = mrmr.bigquery.mrmr_regression(
    bq_client=bq_client,
    table_id='bigquery-public-data.covid19_open_data.covid19_open_data',
    target_column='new_deceased',
    K=20
)

Reference

For an easy-going introduction to mRMR, read my article on Towards Data Science: “MRMR” Explained Exactly How You Wished Someone Explained to You.

Also, this article describes an example of mRMR used on the world famous MNIST dataset: Feature Selection: How To Throw Away 95% of Your Data and Get 95% Accuracy.

mRMR was born in 2003, this is the original paper: Minimum Redundancy Feature Selection From Microarray Gene Expression Data.

Since then, it has been used in many practical applications, due to its simplicity and effectiveness. For instance, in 2019, Uber engineers published a paper describing how they implemented MRMR in their marketing machine learning platform Maximum Relevance and Minimum Redundancy Feature Selection Methods for a Marketing Machine Learning Platform.

Nearby in the ranking
Similar items