MCPcopy Create free account
hub / github.com/alignoth/alignoth / zs

Function zs

resources/vega.min.js:4832–4855  ·  view source on GitHub ↗
(t, e, n)

Source from the content-addressed store, hash-verified

4830 };
4831 }
4832 function zs(t, e, n) {
4833 let r = 0,
4834 i = 0,
4835 o = 0,
4836 a = 0,
4837 s = 0,
4838 u = 0;
4839 Fs(t, e, n, (t, e) => {
4840 const n = Math.log(t),
4841 l = Math.log(e);
4842 (++u,
4843 (r += (n - r) / u),
4844 (i += (l - i) / u),
4845 (o += (n * l - o) / u),
4846 (a += (n * n - a) / u),
4847 (s += (e - s) / u));
4848 });
4849 const l = Ds(r, i, o, a),
4850 c = (t) => l[0] * Math.pow(t, l[1]);
4851 return (
4852 (l[0] = Math.exp(l[0])),
4853 { coef: l, predict: c, rSquared: Ss(t, e, n, s, c) }
4854 );
4855 }
4856 function Ns(t, e, n) {
4857 const [r, i, o, a] = Cs(t, e, n),
4858 s = r.length;

Callers

nothing calls this directly

Calls 3

FsFunction · 0.85
DsFunction · 0.85
SsFunction · 0.85

Tested by

no test coverage detected