forecasting/node_modules/@forecasting/aggregation/tests.js
2022-04-21 23:23:24 -04:00

20 lines
450 B
JavaScript

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));