forecasting/node_modules/@forecasting/aggregation/tests.js

20 lines
450 B
JavaScript
Raw Normal View History

2022-04-22 03:23:24 +00:00
import {
median,
arithmeticMean,
geometricMean,
geometricMeanOfOdds,
extremizedGeometricMeanOfOdds,
neyman,
} from "./index.js";
let ps = [0.1, 0.2, 0.4, 0.5];
console.log(ps);
console.log(median(ps));
console.log(arithmeticMean(ps));
console.log(geometricMean(ps));
console.log(geometricMeanOfOdds(ps));
console.log(extremizedGeometricMeanOfOdds(ps, 1.5));
console.log(extremizedGeometricMeanOfOdds(ps, 2.5));
console.log(neyman(ps));