Skip to content

Conversation

@Dcyaprogrammer
Copy link
Contributor

Pull Request Template

Description

A Decision Tree is a supervised machine learning algorithm that recursively splits data into subsets based on feature values to create a tree-like structure for classification. Each internal node represents a decision based on a feature, each branch represents an outcome of that decision, and each leaf node represents a class label.

Type of change

-✅ New feature (non-breaking change which adds functionality)

Checklist:

  • ✅ I ran bellow commands using the latest version of rust nightly.
  • ✅ I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • ✅ I ran cargo fmt just before my last commit.
  • ✅ I ran cargo test just before my last commit and all tests passed.
  • ✅ I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • ✅ I added my algorithm to DIRECTORY.md with the correct link.
  • ✅ I checked COUNTRIBUTING.md and my code follows its guidelines.

@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 97.36148% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.07%. Comparing base (4402903) to head (8ed7ee6).

Files with missing lines Patch % Lines
src/machine_learning/decision_tree.rs 97.36% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1004      +/-   ##
==========================================
+ Coverage   96.06%   96.07%   +0.01%     
==========================================
  Files         371      372       +1     
  Lines       25943    26322     +379     
==========================================
+ Hits        24922    25290     +368     
- Misses       1021     1032      +11     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dcyaprogrammer
Copy link
Contributor Author

Hi @siriak, would you please take a look to your convenience. I believe this is ready to be merged. Thank you! Lines missing coverage in the report are function's inside logic, hard to cover with test case. Normal and boundary cases have been tested

@siriak siriak merged commit 89e784f into TheAlgorithms:master Jan 20, 2026
7 checks passed
@Dcyaprogrammer Dcyaprogrammer deleted the dt branch January 21, 2026 03:27
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.

3 participants