Ekeany / Boruta-Shap

A Tree based feature selection tool which combines both the Boruta feature selection algorithm with shapley values.
MIT License
590 stars 88 forks source link

[ENH] Create a support_ attribute to avoid error in generating a dataframe report or to select in a sklearn way #38

Open cfrancois7 opened 3 years ago

cfrancois7 commented 3 years ago

Current Situation

Currently, the selector has mutliple columns attribute. Also, it not easy to apply the selection of features through an attribute "support_" similar to sklearn framework. Also, it is not sure, except if we go into the code, that the order of hits is similar to the order of columns of the dataframe provided as argument.

Enhancement

Ekeany commented 3 years ago

Hi,

If I understand correctly you would like to be able to view the number of hits received for each feature ?. You can certainly make a pull request if you want.

The hits are stored in self.hits and then the column names are stored as self.all_columns so it is just a matter of creating a function to merge these to into a dataframe and then you will need to map the self.rejected_columns = [] self.accepted_columns = [] lists to create a column of which features were accepted.