Improve messages in benchmarking
This commit is contained in:
parent
60f3445277
commit
592bdbb9e9
|
@ -23,7 +23,10 @@ export function expectEqual(expression1: string, expression2: string) {
|
||||||
let result2 = testRun(expression2);
|
let result2 = testRun(expression2);
|
||||||
if (result1.tag === "number" && result2.tag === "number") {
|
if (result1.tag === "number" && result2.tag === "number") {
|
||||||
let loss = getLoss(result1.value, result2.value);
|
let loss = getLoss(result1.value, result2.value);
|
||||||
console.log(`${result1.value} === ${result2.value}\nLoss: ${loss}`);
|
console.log(`${expression1} === ${expression2}`);
|
||||||
|
console.log(`${result1.value} === ${result2.value}`);
|
||||||
|
console.log(`loss = ${loss}`);
|
||||||
|
console.log(`logloss = ${Math.log(loss)}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"start": "rescript build -w -with-deps",
|
"start": "rescript build -w -with-deps",
|
||||||
"clean": "rescript clean",
|
"clean": "rescript clean",
|
||||||
"test:reducer": "jest __tests__/Reducer*/",
|
"test:reducer": "jest __tests__/Reducer*/",
|
||||||
|
"benchmark": "ts-node benchmark/conversion_tests.ts",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:ts": "jest __tests__/TS/",
|
"test:ts": "jest __tests__/TS/",
|
||||||
"test:rescript": "jest --modulePathIgnorePatterns=__tests__/TS/*",
|
"test:rescript": "jest --modulePathIgnorePatterns=__tests__/TS/*",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user