package prbnmcn-stats

  1. Overview
  2. Docs

Module Stats.BinningSource

Binning finitely supported distributions

Sourcetype spec

The type of binning specifications (shape of the grid, etc)

Sourceval regular : origin:float -> width:float -> truncate:(float * float) option -> spec

regular ~origin ~width ~truncate specifies a regular grid with cells aligned on origin and spaced by width. Cells are indexed, with the cell [origin, origin+width] having index 0. If truncate is equal to Some (l, r), the points outside of the (inclusive) [l, r] interval will be discarded.

  • raises Invalid_argument

    if width <= 0 or if truncate = Some (l, r)and the [l, r] interval is empty.

Sourceval compute : spec -> float Fin.Float.mes -> int Fin.Float.mes

compute spec mes bins the mesure on the grid specified by spec. After binning, the measure is supported by grid indices corresponding to the specification.