smartcorelib / smartcore

A comprehensive library for machine learning and numerical computing. The library provides a set of tools for linear algebra, numerical computing, optimization, and enables a generic, powerful yet still efficient approach to machine learning.
https://smartcorelib.org/
Apache License 2.0
671 stars 76 forks source link

Implement the feature importance for Decision Tree Classifier #275

Closed tushushu closed 4 months ago

tushushu commented 5 months ago

This PR fixes part 1/3 of #124

Checklist

Current behaviour

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.

codecov-commenter commented 5 months ago

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 :warning:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Mec-iS commented 5 months ago

hi! thanks for the PR.

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

tushushu commented 5 months ago

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 commented 4 months ago

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

tushushu commented 4 months ago

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

Mec-iS commented 4 months ago

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

tushushu commented 4 months ago

@Mec-iS Nice working on this PR.