smazzanti / mrmr

mRMR (minimum-Redundancy-Maximum-Relevance) for automatic feature selection at scale.
MIT License
522 stars 79 forks source link

Spearman correlation for redundancy #42

Closed antoniotdelend closed 5 months ago

antoniotdelend commented 6 months ago

How can i implement Spearman correlation coefficient to calculate redundancy? There's any way this could be done using spearmanr from scipy?

link bellow:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.spearmanr.html

smazzanti commented 5 months ago

You can pass a callable as specified here:

redundancy: str or callable
    Redundancy method.
    If string, name of method, supported: "c" (Pearson correlation).
    If callable, it should take "X", "target_column" and "features" as input and return a pandas.Series
    containing a score of redundancy for each feature.