ByteEfficiencyAudits use piecewise raw to score functions · Issue #11883 · GoogleChrome/lighthouse · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

ByteEfficiencyAudits use piecewise raw to score functions #11883

Open
@koraa

Description

@koraa

The byte efficiency audits use a secoring functions that is defined by linear interpolation between three control points: {0, p_avg, p_poor, p_zero}, the positions between which are defined by linear interpolation between the points. Here is the curve from byte-efficiency-audit.js with control points={0, 300, 750, 5000}, forming what looks like an approximation of a convex curve:

screenshot2

Having such a piecewise function is undesirable for two resons: (1) It complicates the code (2) it can increase variance when measures values lie close to the control points.
Choosing p10=90, median=700 this curve can be approximated using the standard log normal distribution. These values where chosen manually using the sliders. The error is biggest towards the lower end of the scores. The parameters could be chosen methodically by using a function fitting tool like the one from gnuplot.

screenshot2

If using the control points is desirable for some reason, another, smooth interpolation method could be used (e.g. cubic, finding a spline, …).

Here's the desmos functions I've used if you would like to play around.

$
g\left(x_{0},y_{0},x_{1},y_{1},x\right)=y_{0}+\left(x-x_{0}\right)\cdot\frac{y_{1}-y_{0}}{x_{1}-x_{0}}
p_{0}=5000
p_{poor}=750
p_{avg}=300
l\left(x\right)=\left{0<x<p_{avg}:g\left(0,1,p_{avg},0.75,x\right),p_{avg}<x<p_{poor}:g\left(p_{avg},0.75,p_{poor},0.5,x\right),p_{poor}<x<p_{0}\ :g\left(p_{poor},0.5,p_{0},0,x\right)\right}
$

Pity gfm doesn't support math mode.

Also merry christmas :)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    TMZ Celebrity News – Breaking Stories, Videos & Gossip

    Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

    Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

    🎥 Watch TMZ Live

    TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.