Skip to content

Correlation function for discrete variable correlation#7326

Merged
DenizAltunkapan merged 13 commits intoTheAlgorithms:masterfrom
kvadrik:patch-7
Mar 31, 2026
Merged

Correlation function for discrete variable correlation#7326
DenizAltunkapan merged 13 commits intoTheAlgorithms:masterfrom
kvadrik:patch-7

Conversation

@kvadrik
Copy link
Copy Markdown
Contributor

@kvadrik kvadrik commented Mar 20, 2026

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new algorithms include a corresponding test class that validates their functionality.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

kvadrik added 2 commits March 20, 2026 21:06
Added unit tests for the Correlation class to validate correlation calculations under various scenarios, including linear dependence and constant values.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.41%. Comparing base (d2744b5) to head (d41d137).

Files with missing lines Patch % Lines
...main/java/com/thealgorithms/maths/Correlation.java 0.00% 22 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7326      +/-   ##
============================================
- Coverage     79.47%   79.41%   -0.07%     
- Complexity     7091     7094       +3     
============================================
  Files           791      792       +1     
  Lines         23202    23224      +22     
  Branches       4565     4567       +2     
============================================
+ Hits          18440    18443       +3     
- Misses         4024     4046      +22     
+ Partials        738      735       -3     

☔ 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.

@AbhiramSakha
Copy link
Copy Markdown
Contributor

Good implementation. Adding more inline comments would improve readability.

kvadrik added 2 commits March 22, 2026 15:18
Added detailed comments to the correlation function for better understanding.
@AbhiramSakha
Copy link
Copy Markdown
Contributor

Nice improvement in comments! The explanation is much clearer now and easier to understand.

@DenizAltunkapan DenizAltunkapan enabled auto-merge (squash) March 31, 2026 16:31
@DenizAltunkapan DenizAltunkapan merged commit ee34336 into TheAlgorithms:master Mar 31, 2026
7 checks passed
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