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

refactor: Deprecate ddof parameter for correlation coefficient #20197

Merged
merged 5 commits into from
Dec 7, 2024

Conversation

flowlight0
Copy link
Contributor

Fix #19420

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Dec 6, 2024
Comment on lines 25 to 28
let function = FunctionExpr::Correlation {
method: CorrelationMethod::Pearson,
ddof,
ddof: 0u8,
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I change FunctionExpr::Correlation ?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we can remove ddof there I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your comment! I moved ddof parameter in FunctionExpr::Correlation into CorrellationMethod::Covariance (f00ff2b) .

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.61%. Comparing base (3fad074) to head (f00ff2b).
Report is 111 commits behind head on main.

Files with missing lines Patch % Lines
...s/polars-plan/src/dsl/function_expr/correlation.rs 85.71% 2 Missing ⚠️
py-polars/polars/functions/lazy.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20197      +/-   ##
==========================================
+ Coverage   79.47%   79.61%   +0.14%     
==========================================
  Files        1555     1564       +9     
  Lines      216318   217986    +1668     
  Branches     2456     2478      +22     
==========================================
+ Hits       171919   173559    +1640     
- Misses      43841    43858      +17     
- Partials      558      569      +11     

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

@ritchie46
Copy link
Member

Thank you @flowlight0 👍

@ritchie46 ritchie46 merged commit 8abc550 into pola-rs:main Dec 7, 2024
26 checks passed
@alexander-beedie
Copy link
Collaborator

初めてのPR、ありがとうございます!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ddof parameter on pl.corr is nonsensical
3 participants