General-purpose forecasting utilities
Go to file
2022-04-21 23:23:24 -04:00
node_modules feat: initial commit 2022-04-21 23:23:24 -04:00
index.js feat: initial commit 2022-04-21 23:23:24 -04:00
package-lock.json feat: initial commit 2022-04-21 23:23:24 -04:00
package.json feat: initial commit 2022-04-21 23:23:24 -04:00
README.md feat: initial commit 2022-04-21 23:23:24 -04:00

About

This package contains a series of utilities related to forecasting. It is currently in alpha. So far, it only contains utilities related to forecast aggregation, but I may add content related to scoring, charts, etc.

Built with

Getting started

Installation

npm install forecasting

Usage

Aggregation

import {
  median,
  arithmeticMean,
  geometricMean,
  geometricMeanOfOdds,
  extremizedGeometricMeanOfOdds,
  neyman,
} from "forecasting";

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)); // 1.5 is the extremization factor
console.log(extremizedGeometricMeanOfOdds(ps, 2.5));
console.log(neyman(ps));

You may also install @forecasting/aggregation directly

Scoring

To be done

Charts

To be done

Roadmap

  • Do another repository for scoring methods
  • Do another repository for charts