Entropy Estimators¶
skfeature.utility.entropy_estimators
Description¶
Entropy Estimators provides k-nearest-neighbor based estimators of entropy, mutual information, conditional mutual information, and KL divergence. It is the numerical backend for all information-theoretic feature selection algorithms.
Usage¶
import numpy as np
from skfeature.utility import entropy_estimators
x = np.random.rand(200)
y = np.random.rand(200)
mi = entropy_estimators.mi(x, y)
Functions¶
entropy(x, k=3, base=2): estimate the entropy of a continuous variablemi(x, y, k=3, base=2): estimate the mutual information between two variablescmi(x, y, z, k=3, base=2): estimate the conditional mutual informationI(x; y | z)kldiv(x, xp, k=3, base=2): estimate the KL divergence between two distributionsentropyd(sx, base=2): entropy of a discrete variablemidd(x, y): mutual information between two discrete variablescmidd(x, y, z): conditional mutual information between discrete variableshist(sx): histogram of a discrete variable
Based on the NPEET implementation by Greg Ver Steeg.