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

Unify weighted mean code #514

Merged
merged 7 commits into from
Mar 2, 2022

Conversation

lowener
Copy link
Contributor

@lowener lowener commented Feb 17, 2022

Needed for rapidsai/cuml#4428

@lowener lowener requested a review from a team as a code owner February 17, 2022 11:27
@github-actions github-actions bot added the cpp label Feb 17, 2022
cpp/include/raft/stats/detail/weighted_mean.cuh Outdated Show resolved Hide resolved
cpp/include/raft/stats/weighted_mean.hpp Outdated Show resolved Hide resolved
@lowener lowener changed the title Add rowSampleWeightedMean Unify weighted mean code Feb 23, 2022
@lowener
Copy link
Contributor Author

lowener commented Feb 23, 2022

I reworked this PR to unify and clean the weighted mean code:

  • I added weightedMean which is more general than the col and row functions.
  • I fixed colWeightedMean documentation which was wrong
  • I added a template for IndexType.
  • I added a test for the cases not covered by rowWeightedMean and colWeightedMean (when the input is col-major)

@lowener lowener requested a review from cjnolet February 23, 2022 19:21
@lowener lowener added non-breaking Non-breaking change feature request New feature or request labels Feb 23, 2022
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

I really like the consolidated version. Overall it looks great.

cpp/test/stats/weighted_mean.cu Show resolved Hide resolved
cpp/test/stats/weighted_mean.cu Outdated Show resolved Hide resolved
cpp/test/stats/weighted_mean.cu Outdated Show resolved Hide resolved
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

LGTM pending CI. Thanks Mickael!

@cjnolet
Copy link
Member

cjnolet commented Mar 2, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit a6f3caf into rapidsai:branch-22.04 Mar 2, 2022
@lowener lowener deleted the 22.04-weighted-mean branch March 2, 2022 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants