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

Add support for filters to T-Test aggregation #54980

Merged
merged 6 commits into from
Apr 10, 2020

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Apr 8, 2020

Adds support for filters to T-Test aggregation. The filters can be used to
select populations based on some criteria and use values from the same or
different fields.

Closes #53692

Adds support for filters to T-Test aggregation. The filters can be used to
select populations based on some criteria and use values from the same or
different fields.

Closes elastic#53692
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

@imotov
Copy link
Contributor Author

imotov commented Apr 8, 2020

@elasticmachine update branch

Copy link
Contributor

@polyfractal polyfractal left a comment

Choose a reason for hiding this comment

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

Left a question about validation, but otherwise looks good. Unpaired fits in nicely, I like how this turned out :)

return new PairedTTestAggregator(name, numericMultiVS, tails, format, searchContext, parent, metadata);
case HOMOSCEDASTIC:
return new UnpairedTTestAggregator(name, numericMultiVS, tails, true, format, searchContext, parent, metadata);
return new UnpairedTTestAggregator(name, numericMultiVS, tails, true, this::getWeights, format, searchContext, parent,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we validate/throw an exception/something if people specify an unpaired type, but don't provide filters? Not sure where to put that validation logic but it seems we should disallow folks from basically running an unpaired test on two match-all's?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about support for something like this:

{"before": [1,2,3], "after":[6,7,8,9,10]}

It currently works for unpaired, fails on paired and doesn't require filters.

Copy link
Contributor

@polyfractal polyfractal 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 what we discussed offline (failing if field is same between A/B and there is no filter) 👍

@imotov imotov removed the request for review from not-napoleon April 9, 2020 19:33
@imotov
Copy link
Contributor Author

imotov commented Apr 10, 2020

@elasticmachine update branch

@imotov imotov merged commit 6d28596 into elastic:master Apr 10, 2020
imotov added a commit to imotov/elasticsearch that referenced this pull request Apr 10, 2020
Adds support for filters to T-Test aggregation. The filters can be used to
select populations based on some criteria and use values from the same or
different fields.

Closes elastic#53692
imotov added a commit that referenced this pull request Apr 13, 2020
Adds support for filters to T-Test aggregation. The filters can be used to
select populations based on some criteria and use values from the same or
different fields.

Closes #53692
@imotov imotov deleted the issue-53692-add-filtes-to-t-test branch May 1, 2020 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Student's t-test aggregation support
5 participants