This commit is contained in:
Anton Nesterov 2024-09-26 06:07:37 +02:00
parent 71583054f8
commit 1568795300
No known key found for this signature in database
GPG key ID: 59121E8AE2851FB5

View file

@ -8,6 +8,10 @@ export function residuals(x: pl.Expr, y: pl.Expr): pl.Expr {
return yM.minus(beta.mul(xM));
}
export const fillzero = (
value = 0.0001,
) => (pl.all().replaceStrict(0, value, pl.all()));
export const ScaleExpr: pl.Expr = (pl.all().minus(pl.all().min())).div(
pl.all().max().minus(pl.all().min()),
);