Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the feature importance for Decision Tree Classifier #275

Merged
merged 11 commits into from
Feb 25, 2024

Conversation

tushushu
Copy link
Contributor

@tushushu tushushu commented Feb 3, 2024

This PR fixes part 1/3 of #124

Checklist

  • My branch is up-to-date with development branch.
  • Everything works and tested on latest stable Rust.
  • Coverage and Linting have been applied

Current behaviour

  • The impurity is not available in the Node object
  • The number of samples is not available in the Node object
  • The number of features is not available in the Decision Tree Classifier
    So the feature importance cannot be calculated after model is trained.

New expected behaviour

The feature importance can be calculated after model is trained.

Change logs

The feature importance can be calculated after the DecisionTreeClassifier is trained.

@tushushu tushushu requested a review from Mec-iS as a code owner February 3, 2024 12:37
@tushushu tushushu marked this pull request as draft February 3, 2024 12:38
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (886b563) 44.98% compared to head (42c4949) 45.17%.

Files Patch % Lines
src/tree/decision_tree_classifier.rs 60.71% 11 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #275      +/-   ##
===============================================
+ Coverage        44.98%   45.17%   +0.18%     
===============================================
  Files               85       85              
  Lines             7214     7226      +12     
===============================================
+ Hits              3245     3264      +19     
+ Misses            3969     3962       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mec-iS
Copy link
Collaborator

Mec-iS commented Feb 4, 2024

hi! thanks for the PR.

Please follow the guidance about running the linter in CONTRIBUTING. The linter check is failing.

@tushushu
Copy link
Contributor Author

tushushu commented Feb 6, 2024

hi! thanks for the PR.

Please follow the guidance about running the linter in CONTRIBUTING. The linter check is failing.

Hey, thanks for providing the doc. I was aware of that and changed the PR status as "Draft". Let me try to fix the linter today or tomorrow.

@tushushu tushushu marked this pull request as ready for review February 7, 2024 01:38
@tushushu
Copy link
Contributor Author

tushushu commented Feb 7, 2024

Hey @Mec-iS I have fixed the linter error, and would you like to review the PR?

@tushushu
Copy link
Contributor Author

Is there anyone else can help review the PR? It has been quite a while.

@morenol morenol merged commit 4eadd16 into smartcorelib:development Feb 25, 2024
12 checks passed
@Mec-iS
Copy link
Collaborator

Mec-iS commented Feb 26, 2024

Thanks @tushushu ! Sorry I missed the notification for this.

@tushushu
Copy link
Contributor Author

@Mec-iS Nice working on this PR.

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