Skip to content

Commit

Permalink
removes the use of interactive metric from the model ahead of C83 c…
Browse files Browse the repository at this point in the history
…hanges

Resolves brave/brave-browser#9176
  • Loading branch information
AndriusA committed May 6, 2020
1 parent 45f3da7 commit fd1ffe1
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 121 deletions.
222 changes: 107 additions & 115 deletions components/brave_perf_predictor/browser/bandwidth_linreg_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,166 +16,165 @@

namespace brave_perf_predictor {

constexpr double model_intercept = 5.085562016132402;
constexpr int feature_count = 214;
constexpr double model_intercept = 5.085407773814489;
constexpr int feature_count = 213;
constexpr std::array<double, feature_count> model_coefficients = {
0.12352367722740858,
-0.0,
0.12337659866050482,
-0.0,
0.0,
0.0,
0.0,
0.006892384968665546,
-0.0053006306015809974,
0.012808044375561328,
-0.022568426204584803,
0.006894977221883717,
-0.0053057834130837605,
0.012862385567785137,
-0.022571575512130217,
0.0,
0.031262883891716595,
-0.008895304473470696,
0.03128111390815784,
-0.008905984853438976,
0.0,
-0.012542033549705674,
-0.018165453504801546,
-0.008479435850304733,
-0.012493676378740588,
-0.01817560552389195,
-0.008378072321895977,
0.0,
0.0,
0.002311112946961536,
0.04901700232714016,
0.002283231356917989,
0.048919735990114545,
0.0,
0.0,
-0.0,
0.03701018507587659,
0.014184085455013776,
0.03710665420979194,
0.014291396463246602,
-0.0,
0.10265583719234812,
0.05237925617436799,
0.102892550977104,
0.052414725498173366,
0.0,
0.2561434657008117,
0.3954099722860754,
0.4241724431436048,
0.2554360194633748,
0.25621205523724505,
0.39537140102916657,
0.42410309202890667,
0.25546300017617013,
-0.0,
0.1110185928151764,
0.11108001260714759,
0.0,
0.0,
-0.0,
0.369424591785374,
-0.0621249125494256,
0.369347502104488,
-0.0621473488525576,
0.0,
-0.19227234809590055,
0.009790817504584938,
-0.19225865475037224,
0.009684176926811635,
-0.0,
0.5981006783511988,
0.5984031539555243,
0.0,
-0.0,
0.0,
0.0,
-0.0,
-0.154225297347611,
0.5815994580458169,
0.07673442247118749,
-0.15442052414735336,
0.5819796534516541,
0.07669089364860023,
-0.0,
0.07985643438092534,
0.07996581319924465,
0.0,
0.08301654084812561,
0.27974978085336505,
-0.3135774687124175,
0.08300572314082845,
0.27985657360814103,
-0.31342877799575186,
0.0,
0.0,
0.0,
-0.0,
0.21721484909061123,
0.21725044259235132,
-0.0,
0.0,
-0.6603212899417499,
0.47382998205049726,
-0.6601745015855838,
0.47381119601381766,
0.0,
0.031566994679697126,
0.03181202307277254,
0.0,
-0.0,
0.0,
0.0,
0.0,
0.41987279273153577,
0.41982354308978265,
-0.0,
-0.0,
0.0,
-0.15704804281369258,
0.05136354590905017,
-0.15701236163909485,
0.05143595038841564,
-0.0,
-1.3967861171544764,
0.012049836970958124,
-0.16190555154009043,
-1.3967255076899114,
0.012164951411760265,
-0.16190436401823916,
0.0,
0.32236468110744876,
-0.10807182142138586,
0.3220696681595943,
-0.1082526947395474,
0.0,
0.28113499778312084,
0.347455093844389,
0.2810643037362584,
0.3475914458610097,
0.0,
-0.0,
0.21577214682210177,
0.2159865469721421,
-0.0,
0.0,
-0.3494463283215819,
-0.15598019593473778,
0.2937099798752649,
-0.34943241394679975,
-0.15571843423959625,
0.2937142943175603,
-0.0,
-0.0,
-0.6670081562284095,
0.03155616836841969,
-0.6666677255779397,
0.03158187579337792,
-0.0,
-0.0,
-0.0,
-0.4821830747864856,
-0.1060109448038188,
-0.4825339029883909,
-0.10536520325606542,
0.0,
0.0,
0.18025872807868917,
0.18019166627132638,
-0.0,
0.059651718175110925,
0.15412094403273932,
0.060628635086959023,
0.1535326725086174,
0.0,
0.0,
0.4104485276968183,
-0.0,
0.41012738584685204,
-0.0,
-0.0573642521280568,
-0.0183387630905243,
-3.9714104351330406e-06,
-0.054919851303674425,
-0.02084871656373664,
-0.0,
0.08825537070503531,
0.08831247903148058,
-0.0,
0.3576615077317695,
0.3576186594301512,
-0.0,
0.20454045632867554,
0.2045708428966265,
-0.0,
-0.22669760740718553,
0.3391651045388519,
0.40841054414438194,
3.320355416478889e-05,
-0.22633684673764687,
0.33920619628350673,
0.4087551349593832,
0.00014400861713193862,
-0.0,
0.009846843806251981,
0.6879938701965732,
-0.09809945092041333,
0.009788614358444537,
0.6882150688542139,
-0.09819510616132636,
0.0,
0.0,
0.0,
0.24660181712712595,
0.24647318516426506,
0.0,
0.0,
0.2971937705828685,
0.2974896639283871,
-0.0,
0.00042832988368958795,
0.0011714853122736216,
0.3681970714031466,
0.1767238117388548,
0.0971655540387981,
0.09612967228805114,
0.0,
-0.4757811965402313,
-0.48264457834902585,
-0.47559667034732106,
-0.48262999096637776,
-0.0,
-0.14897936787284055,
-0.14856884527780762,
-0.0,
0.0,
0.0,
-0.06864524030396776,
-0.06867861932624512,
0.0,
0.0,
0.0,
Expand All @@ -184,63 +183,62 @@ constexpr std::array<double, feature_count> model_coefficients = {
-0.0,
-0.0,
-0.0,
-0.0939514698836343,
-0.17375737654279771,
0.4280298407194896,
0.07921243395532432,
-0.07016021046322078,
-0.19673925717707294,
0.4279422735214434,
0.07935762516999385,
0.0,
0.0,
0.002297138241541185,
0.001748304149647706,
-0.0,
-0.0,
-0.0,
-0.01300337447750894,
-0.01305037928240179,
-0.0,
0.0643992239129706,
0.19270927069891977,
-0.40965167510194395,
0.2558178171151348,
0.0013887823536121427,
-0.4098203655723224,
-0.0,
-0.0,
-0.12522557448112873,
-0.1250453331155213,
0.0,
0.0,
0.07914189703224955,
0.030383389451194256,
0.10399781691346788,
0.005453211270251716,
-0.0,
0.03990905584174161,
1.157147484387678,
0.03981426371078261,
1.157031326454923,
0.0,
-0.0,
0.0,
0.0,
0.013087405412848738,
0.4259520667147177,
-0.0,
0.17464108300530065,
0.25197880082746205,
6.557171791471991e-07,
0.014181325019371424,
0.0,
-0.09217632122309656,
-0.09220432982116501,
0.0,
0.0,
0.0,
-0.0,
-0.0,
-0.13491648330155384,
-0.1103248978017494,
-0.0,
-0.03688074309361575,
-0.058518504088209695,
-0.03628699126870285,
-0.08325838279176839,
0.0,
-0.0,
-0.03592820829466529,
-0.3346781157893913,
-0.3706138376948898,
-2.0791965507275406e-05,
-0.0
};

constexpr unsigned int standardise_feat_count = 24;
constexpr unsigned int standardise_feat_count = 23;

constexpr std::array<double, standardise_feat_count> standardise_feat_means = {
11.155786350148368,
1016.2856083086053,
1902.963649851632,
1181.3004451038576,
717.0712166172107,
1987.0066765578636,
Expand All @@ -267,7 +265,6 @@ constexpr std::array<double, standardise_feat_count> standardise_feat_means = {
constexpr std::array<double, standardise_feat_count> standardise_feat_scale = {
12.073811227476089,
926.9436100765363,
1793.6185415841003,
979.2250013928962,
779.8742124298378,
1919.1239982290276,
Expand All @@ -294,7 +291,6 @@ constexpr std::array<double, standardise_feat_count> standardise_feat_scale = {
const std::array<std::string, feature_count> feature_sequence{
"adblockRequests",
"metrics.firstMeaningfulPaint",
"metrics.interactive",
"metrics.observedDomContentLoaded",
"metrics.observedFirstVisualChange",
"metrics.observedLoad",
Expand Down Expand Up @@ -718,10 +714,6 @@ const base::flat_map<std::string, stdfactor> stdfactor_map = {
"metrics.firstMeaningfulPaint",
{ 1016.2856083086053, 926.9436100765363 }
},
{
"metrics.interactive",
{ 1902.963649851632, 1793.6185415841003 }
},
{
"metrics.observedDomContentLoaded",
{ 1181.3004451038576, 979.2250013928962 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TEST(BraveSavingsPredictorTest, FeatureArrayGetsPrediction) {
TEST(BraveSavingsPredictorTest, HandlesSpecificVectorExample) {
// This test needs to be updated for any change in the model
constexpr std::array<double, feature_count> sample = {
20, 129, 225, 225, 142, 925, 5, 34662, 3, 317818, 9, 1702888,
20, 129, 225, 142, 925, 5, 34662, 3, 317818, 9, 1702888,
0, 0, 1, 324, 32, 238315, 9, 90131, 54, 2367498, 59, 2384138,
0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand Down Expand Up @@ -77,7 +77,6 @@ TEST(BraveSavingsPredictorTest, HandesSpecificFeaturemapExample) {
{"thirdParties.Po.st.blocked", 1},
{"adblockRequests", 20},
{"metrics.firstMeaningfulPaint", 129},
{"metrics.interactive", 225},
{"metrics.observedDomContentLoaded", 225},
{"metrics.observedFirstVisualChange", 142},
{"metrics.observedLoad", 925},
Expand Down
Loading

0 comments on commit fd1ffe1

Please sign in to comment.