Variable importance (X_imp)

from pyxla import X_imp
from pyxla.util import load_sample
%cd ../../..
/home/toni/Projects/pyxla-wg/docs
nk_k1 = load_sample('nk_n14_k1', exclude='D') # exclude huge D file
nk_k2 = load_sample('nk_n14_k2', exclude='D') # exclude huge D file
nk_k4 = load_sample('nk_n14_k4', exclude='D') # exclude huge D file
corr_matrix, importance_ranks, plot = X_imp(nk_k1, binary=True, estimator='ridge', seed=42)
../../_images/c36aaa9c661bba3b8bdcfb48fac73e587dcf7cc07d6f951a2d6d89f6ed6d0f0d.png
importance_ranks
{'f0':       X  importance  std  rank
 0   x14         0.0  0.0     1
 1   x13         0.0  0.0     2
 2   x12         0.0  0.0     3
 3   x11         0.0  0.0     4
 4   x10         0.0  0.0     5
 5    x9         0.0  0.0     6
 6    x8         0.0  0.0     7
 7    x7         0.0  0.0     8
 8    x6         0.0  0.0     9
 9    x5         0.0  0.0    10
 10   x4         0.0  0.0    11
 11   x3         0.0  0.0    12
 12   x2         0.0  0.0    13
 13   x1         0.0  0.0    14}
corr_matrix, importance_ranks, plot = X_imp(nk_k2, binary=True, estimator='ridge', seed=42)
../../_images/c36aaa9c661bba3b8bdcfb48fac73e587dcf7cc07d6f951a2d6d89f6ed6d0f0d.png
corr_matrix, importance_ranks, plot = X_imp(nk_k4, binary=True, estimator='ridge', seed=42)
../../_images/f6f0439e302dd0b1d3ad81698b97a6bd3499d459c7d88c59f12790568136c80d.png