Skip to content

Conversation

@john-waczak
Copy link
Contributor

This update adds feature_importances to the report for each model from DecisionTrees.jl using the impurity_importance function. I've followed the same output format as the feature_importances from EvoTrees.jl and added a simple test for each method to runtests.jl.

@ablaom
Copy link
Member

ablaom commented Aug 9, 2022

@OkonSamuel

@OkonSamuel
Copy link
Member

This update adds feature_importances to the report for each model from DecisionTrees.jl using the impurity_importance function. I've followed the same output format as the feature_importances from EvoTrees.jl and added a simple test for each method to runtests.jl.

I can see here that you are using impurity_importance. I suggest adding a new parameter to DecisionTree models that would allow the user to specify the method to use in computing feature importance.

@john-waczak
Copy link
Contributor Author

john-waczak commented Aug 10, 2022

Are you suggesting I add a new hyperparamter to the structs in MLJDecisionTreeInterface.jl? If not, where should this go?

@OkonSamuel
Copy link
Member

Are you suggesting I add a new hyperparamter to the structs in MLJDecisionTreeInterface.jl? If not, where should this go?

Yes.

@john-waczak
Copy link
Contributor Author

john-waczak commented Aug 10, 2022

@OkonSamuel

Okay, now we've got the ability to choose from :none, :impurity, and :split. I wasn't sure how to deal with the permutation_importance function generically as it has a different signature than the other two. Any suggestions?

@OkonSamuel
Copy link
Member

@OkonSamuel

Okay, now we've got the ability to choose from :none, :impurity, and :split. I wasn't sure how to deal with the permutation_importance function generically as it has a different signature than the other two. Any suggestions?

Don't worry about permutation importance for now. That would added later to MLJBase.

@john-waczak
Copy link
Contributor Author

Okay, sounds good. Is there anything else that needs to be done?

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2022

Codecov Report

Merging #28 (0b3b19f) into dev (d94341a) will increase coverage by 0.67%.
The diff coverage is 89.74%.

@@            Coverage Diff             @@
##              dev      #28      +/-   ##
==========================================
+ Coverage   86.20%   86.88%   +0.67%     
==========================================
  Files           1        1              
  Lines          87      122      +35     
==========================================
+ Hits           75      106      +31     
- Misses         12       16       +4     
Impacted Files Coverage Δ
src/MLJDecisionTreeInterface.jl 86.88% <89.74%> (+0.67%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@OkonSamuel OkonSamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@john-waczak. I have reviewed your PR and suggested changes.

…ue, and define MMI.feature_importances function
@john-waczak
Copy link
Contributor Author

@OkonSamuel Okay, I think I have it updated to follow the format now. Apologies for the confusion; I was using EvoTrees.jl as an example and thought they needed to be in the report. I ended up adding features to the report of each model so they'd be available for the feature_importances function. I guess EvoTrees.jl will need to be updated next, right?

@OkonSamuel
Copy link
Member

@OkonSamuel Okay, I think I have it updated to follow the format now. Apologies for the confusion; I was using EvoTrees.jl as an example and thought they needed to be in the report. I ended up adding features to the report of each model so they'd be available for the feature_importances function. I guess EvoTrees.jl will need to be updated next, right?

Yes. We plan to make changes to several packages including EvoTrees.jl

Copy link
Member

@OkonSamuel OkonSamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @john-waczak for all your effort. Just a few things that needs to be addressed and this PR would be ready for merge.

@john-waczak
Copy link
Contributor Author

@OkonSamuel Glad to help!

@OkonSamuel OkonSamuel merged commit ffad767 into JuliaAI:dev Aug 11, 2022
@ablaom
Copy link
Member

ablaom commented Aug 17, 2022

Okay, great to have this. I'll tag a new release.

This was referenced Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants