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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

t-test is two-tailed instead of one-tailed #104

Closed
erip opened this issue Dec 13, 2022 · 9 comments
Closed

t-test is two-tailed instead of one-tailed #104

erip opened this issue Dec 13, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@erip
Copy link
Contributor

erip commented Dec 13, 2022

馃悰 Bug

The code to perform paired t-test is two-tailed instead of one-tailed. The alternative hypothesis that users typically care about is that the baseline mean score is less than sys1's mean score, but that is not reflected in the test.

To Reproduce

See here :-)

Expected behaviour

The test should probably use alternative="less" or otherwise be configurable.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

OS: [e.g. iOS, Linux, Win] N/A
Packaging [e.g. pip, conda] N/A
Version [e.g. 0.5.2.1] N/A

Additional context

@erip erip added the bug Something isn't working label Dec 13, 2022
@ricardorei ricardorei self-assigned this Dec 16, 2022
@ricardorei
Copy link
Collaborator

I am adding a flag for t_test alternative and setting it by default to "less".

@ricardorei
Copy link
Collaborator

This will be available on the next release

@erip
Copy link
Contributor Author

erip commented Dec 19, 2022

Perhaps for the sake of not breaking the API, setting the default to "two-sided" might be a better option until the next major release? I'd hate to be the cause of people's papers comparing apples and oranges. I think with the ability to configure it, this should cover the issue well.

@ricardorei
Copy link
Collaborator

@erip Thats a good point thanks!

The next release will be 2.0 and we are also going to replace the default models with new ones.

We will make it clear that scores (with default settings) won't be directly comparable to the previous version (1.1.3).

There will be backward compatibility but default options will probably change for all 3 commands: comet-score, comet-mbr and comet-compare

@ricardorei
Copy link
Collaborator

ricardorei commented Dec 19, 2022

I agree with you that people typically want to know if baseline mean score is less than sys1's mean score. I think its a good call to change the t_test to less. What you think?

Atm this is only updated in the fix-multigpu branch and not merged into master.

@erip
Copy link
Contributor Author

erip commented Dec 19, 2022

It seems very reasonable to me. I'm hoping there's not some nuance that I've overlooked here. I can look at sacrebleu to see what their alternative hypothesis is in their tests (for sake of consistency more than correctness).

@ricardorei
Copy link
Collaborator

Perfect! Thanks!

@erip
Copy link
Contributor Author

erip commented Dec 19, 2022

Unless I'm misreading their code, it seems like they're testing using a two-sided alternative hypothesis due to the absolute value.

@ricardorei
Copy link
Collaborator

@erip I looked a bit more into this and indeed two-sided t_test is more usual and results made more sense in my tests. Nonetheless I am keeping the option to change that in the command line. I am going to merge v2.0 into master.

The release was delayed but at least master will contain the new changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants