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

fix computation of serial correlation factor scct1 #1771

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

vthib
Copy link
Contributor

@vthib vthib commented Aug 20, 2022

for a sequence `a0, a1, ..., aN``, scct1 is:

a0 * a1 + ... + a(n-1) * aN + aN * a0

This was badly computed, as instead of computing aN * a0, aN * aN was
added instead.

This was I guess missed in the tests, because in the only test on
serial_correlation, the string used has a0 = aN.

for a sequence `a0, a1, ..., aN``, scct1 is:

`a0 * a1 + ... + a(n-1) * aN + aN * a0`

This was badly computed, as instead of computing aN * a0, aN * aN was
added instead.

This was I guess missed in the tests, because in the only test on
serial_correlation, the string used has a0 = aN.
@plusvic plusvic requested a review from wxsBSD August 22, 2022 09:01
Copy link
Collaborator

@wxsBSD wxsBSD left a comment

Choose a reason for hiding this comment

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

Wow, what a great find and thank you for the submission! I think this is correct.

I was able to test it against https://fourmilab.ch/random/ - which is where the idea for a lot of this originally came from - and it was indeed incorrect before. The tests now match what ent is saying for the same data.

@plusvic plusvic merged commit c1160ea into VirusTotal:master Aug 22, 2022
@vthib vthib deleted the fix-serial-correlation-computation branch August 22, 2022 23:18
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

3 participants