Using PyMFE

Extracting metafeatures with PyMFE is easy.

The simplest way to extract meta-features is by instantiating the MFE class. It computes five meta-features groups by default using mean and standard deviation as summary functions: General, Statistical, Information-theoretic, Model-based, and Landmarking. The fit method can be called by passing the X and y. Then the extract method is used to extract the related measures. A simple example using pymfe for supervised tasks is given next:

# Load a dataset
from sklearn.datasets import load_iris
from pymfe.mfe import MFE

data = load_iris()
y =
X =

# Extract default measures
mfe = MFE(), y)
ft = mfe.extract()

# Extract general, statistical and information-theoretic measures
mfe = MFE(groups=["general", "statistical", "info-theory"]), y)
ft = mfe.extract()

For more examples see sphx_glr_auto_examples.