sramirez / spark-infotheoretic-feature-selection

This package contains a generic implementation of greedy Information Theoretic Feature Selection (FS) methods. The implementation is based on the common theoretic framework presented by Gavin Brown. Implementations of mRMR, InfoGain, JMI and other commonly used FS filters are provided.
http://sci2s.ugr.es/BigData
Apache License 2.0
134 stars 46 forks source link

How I can extract output Features with Scores from InfoThSelector ? #13

Closed mkhalid12 closed 6 years ago

mkhalid12 commented 6 years ago

I am using MIM feature selector model. It running perfectly fine and output the features results automatically in a terminal. How can I extract output features with its relevant score? I want to save this output to a file.

val selector = new InfoThSelector()
         .setSelectCriterion("mim")
         .setNumTopFeatures(2)
         .setFeaturesCol("features")
         .setLabelCol("class")
         .setOutputCol("selectedFeatures")
sramirez commented 6 years ago

Scores are printed as standard output as far as I remember. You may extract them from your Spark logs. You can also modify the code to generate your output as demanded.