From 96adb0a47e0b14f1421d20e2ca9730506a1866e3 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Mon, 19 Dec 2022 14:10:10 +0000 Subject: [PATCH] fix(calibrate): hide error value --- --- a/tests/src/calibrate.ts +++ b/tests/src/calibrate.ts @@ -174,7 +174,7 @@ const hypothesisLinear = (a: Fract, b: Fract) => (x: Fract) => rpn(x, a, '*', b, '+'); -function error(points: { x: Fract, y: Fract }[], hypothesis: (a: Fract) => Fract) { +function _error(points: { x: Fract, y: Fract }[], hypothesis: (a: Fract) => Fract) { return points.map(p => { const v = hypothesis(p.x); const vv = p.y; @@ -218,7 +218,7 @@ const {a, b} = linearRegression(dataPoints); const hyp = hypothesisLinear(a, b); - console.log(`\t[NFT transfer] Error: ${error(dataPoints, hyp).toNumber()}`); + // console.log(`\t[NFT transfer] Error: ${_error(dataPoints, hyp).toNumber()}`); // 0.1 UNQ const perfectValue = hyp(rpn(new Fract(helper.balance.getOneTokenNominal()), new Fract(1n, 10n), '*')); @@ -276,7 +276,7 @@ const {a, b} = linearRegression(dataPoints); const hyp = hypothesisLinear(a, b); - console.log(`\t[ETH NFT transfer] Error: ${error(dataPoints, hyp).toNumber()}`); + // console.log(`\t[ETH NFT transfer] Error: ${_error(dataPoints, hyp).toNumber()}`); // 0.15 UNQ const perfectValue = hyp(rpn(new Fract(helper.balance.getOneTokenNominal()), new Fract(15n, 100n), '*')); -- gitstuff