-
Notifications
You must be signed in to change notification settings - Fork 48
feat: add Series.cov
method
#368
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can I add Dataframes.cov
based on this commit?
left_numeric = cast(ibis_types.NumericColumn, left) | ||
right_numeric = cast(ibis_types.NumericColumn, right) | ||
bq_cov = _apply_window_if_present( | ||
left_numeric.cov(right_numeric, how="sample"), window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's how='sample'
meaning here? Do we calculate the cov
based on a sample series?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample variance often means it is population_variance * N / N-1. This provides an unbiased estimator of variance https://mathworld.wolfram.com/SampleVariance.html.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕