-
Notifications
You must be signed in to change notification settings - Fork 141
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
Standard deviation for aggregations #143
Conversation
Part of enhancement requested on issue #84 |
@danni-m |
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.
I went over the math and the math looks good. I recommend someone who is fluent in the TS module go over it to verify the best practices of TS module are met.
src/compaction.c
Outdated
@@ -122,7 +122,7 @@ double VarPopulationFinalize(void *contextPtr) { | |||
if(count <= 1) { | |||
return 0; | |||
} |
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.
This test should be handled by variance
function (before dividing by count
)
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.
Nice catch!
Done.
Looks good, just one minor comment |
@otnielvh, as requested, made a random test with seed and epsilon. |
assert r.execute_command('TS.CREATERULE', raw_key, std_key, "AGGREGATION", 'std.s', random_numbers) | ||
assert r.execute_command('TS.CREATERULE', raw_key, var_key, "AGGREGATION", 'var.s', random_numbers) | ||
|
||
for i in range(random_numbers): |
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.
len(items)
would be clearer
This PR is a copy of #125 which was opened on June 6th.