Bug 1821791 - Use kmeans filter in raptor extra-summary-methods. r=AlexandruIonescu...
commiteefd81b2aa080f81626be04f805050196d985348
authorGreg Mierzwinski <gmierz2@outlook.com>
Wed, 15 Mar 2023 13:10:46 +0000 (15 13:10 +0000)
committerGreg Mierzwinski <gmierz2@outlook.com>
Wed, 15 Mar 2023 13:10:46 +0000 (15 13:10 +0000)
treec29e4ae2ef46c473d19bd0040bd03c756869ce02
parent6fd56978fcec330a7526c0c0ab68bc37326b2538
Bug 1821791 - Use kmeans filter in raptor extra-summary-methods. r=AlexandruIonescu,perftest-reviewers

This patch changes the filtering method from a gaussian filter to a k-means filter that should be more suitable to our needs. See this bug comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1821791#c0

With kmeans from scipy, we specify it to search for 2 groups. From there, we check to see if there is a group that comprises no more than 40% of the total size. If there is a group, then we check if the difference in the means are 200%. If they are, then we throw out the dataset that has the least amount of data in it.

This fixes an issue where datasets that had outliers that skewed the standard deviation, and the mean too much would prevent us from removing them.

Differential Revision: https://phabricator.services.mozilla.com/D172320
testing/raptor/raptor/output.py