A proposal to make the correlated t-test less conservative#1
Open
NeeleKemper wants to merge 1 commit intodpaetzel:mainfrom
Open
A proposal to make the correlated t-test less conservative#1NeeleKemper wants to merge 1 commit intodpaetzel:mainfrom
NeeleKemper wants to merge 1 commit intodpaetzel:mainfrom
Conversation
dpaetzel
requested changes
Jul 3, 2024
| rho = self.fraction_test | ||
|
|
||
| sigma_2_hat = ((x - x_over) ** 2).sum() / (n - 1) | ||
| corrected_sigma_2_hat = (1 / n + rho / (1 - rho)) * sigma_2_hat # Corrected variance using Nadeau-Bengio's correction |
Owner
There was a problem hiding this comment.
Please comment above the lines to keep the lines the comments refer to (to keep lines at less than 80 characters). Also, please end comments with a full stop.
|
Note that it makes the tests more conservative for variances < 1 (which would be quite common for losses or other error metrics, especially on standardized datasets) and only less conservative on higher values. However, from my testing of this PR, the results feel more 'correct' for the smaller values. In the sense that they align better with my visual interpretations of plotting the runs individually |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the correlated t-test, the squared variance should be used as the scale parameter, as the scipy.stats.t expects the standard deviation.
See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.t.html