Module reservoirs::utils[][src]

Basic utility functions, largely reinventing the wheel.

Functions

ad_dual

Anderson-Darling Two-Sample Test

bootstrap

Bootstrap a synthetic dataset from observed samples.

cdf

Estimate the cumulative distribution function (CDF) of a vector of observations.

cdf_bin

Estimate the cumulative distribution function (CDF) of a vector of observations x, binned into bins number of obs to preserve memory on large vectors.

cdf_dual

Appends one vector to another and generates the CDF of observations.

cdf_from_pmf

Returns the cdf given a pmf, implementing a cumulative sum over f64 values.

cdf_rng

take the cdf of observations over a range of discrete values

convo

Convolve frequency distributions along an index of values.

index_f64

Produce integer-like index of f64 values from generic range.

low_point

Calculates the low point along y and returns the value of x at the low point.

mean

Calculate the mean of a slice of f64 values.

median

Calculate the median of a slice of f64 values.

pmf_from_cdf

pmf from observations

quantile

Calculate the value of the CDF of obs at a given threshold thresh. Called by quantiles.

quantiles

Calculate the quantiles for a box-and-whisker plot (2.5%, 25%, 50%, 75%, 97.5%).

read_f64

Read data from csv file.

record

Write statistical results to csv file.