python - How can I use "metrics.mutual_info" in scikit's feature.selection -


i use other scoring functions chi2 etc., not listed on page.

http://scikit-learn.org/stable/modules/feature_selection.html

http://scikit-learn.org/stable/modules/classes.html

for example metrics.mutual_info , metrics.balanced_accuracy_score

how can integrate code?

thanks help

the new scikit-learn version 0.18, has added support mutual information feature selection. no need use metrics.mutual_info. can use new feature_selection.mutual_info_classif score function in selectkbest or selectpercentile use chi2.

x_new = selectkbest(mutual_info_classif, k=100).fit_transform(x, y) 

for more information resent changes @ changelog.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -