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

Reverse order of samplesize variance test to match usage #3276

Merged

Conversation

piersoh
Copy link
Contributor

@piersoh piersoh commented Jun 3, 2020

The current getSampleSize() function expands the sampleSize based on checking the variance of subsequent samples from the beginning, but does so in the opposite order to which getAverageSlidingWindow() actually uses the resulting samples - which takes those from the end. This fix corrects the check so that it operates from the end(newest) items of the queue backwards.

@dsilhavy
Copy link
Collaborator

dsilhavy commented Jun 4, 2020

Thanks, you are correct. Since getAverageSlidingWindow slices from the end, sample size should also be calculated with the most recent samples.

@dsilhavy dsilhavy added this to the 3.1.2 milestone Jun 4, 2020
@dsilhavy dsilhavy merged commit a28b83c into Dash-Industry-Forum:development Jun 4, 2020
@dsilhavy dsilhavy self-requested a review June 4, 2020 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants