Module cloudi_percentiles

CloudI Percentiles

Calculate percentiles with all samples stored using definition 8 (proposed as a standard sample quantile definition by Hyndman and Fan).

.

Copyright © 2022 Michael Truog

Version: 2.0.5 Oct 11 2022 20:13:44 ------------------------------------------------------------------------

Authors: Michael Truog (mjtruog at protonmail dot com).

Description

CloudI Percentiles

Calculate percentiles with all samples stored using definition 8 (proposed as a standard sample quantile definition by Hyndman and Fan).

The 50% percentile is the median.

Rob J. Hyndman, Yanan Fan. Sample Quantiles in Statistical Packages. American Statistician, vol. 50, no. 4, pp. 361–365, American Statistical Association, 1996-11.

Data Types

state()

state() = #percentiles{n = non_neg_integer(), samples = [number()]}

Function Index

add/2

Add a sample for computing percentiles.

.
add_from_list/2

Add samples from a list for computing percentiles.

.
calculate/2

Calculate percentiles from the samples previously added.

Percentiles must be provided in ascending order and be in the range (0.0 ..
count/1

Count of samples previously added.

.
merge/2

Merge percentiles state.

.
new/0

Create percentiles state.

.

Function Details

add/2

add(X::number(), State::state()) -> state()

Add a sample for computing percentiles.

add_from_list/2

add_from_list(L::[number()], State::state()) -> state()

Add samples from a list for computing percentiles.

calculate/2

calculate(Percentiles::[float(), ...], State::state()) -> [float(), ...] | undefined

Calculate percentiles from the samples previously added.

Percentiles must be provided in ascending order and be in the range (0.0 .. 1.0).

count/1

count(State::state()) -> non_neg_integer()

Count of samples previously added.

merge/2

merge(StateA::state(), StateB::state()) -> state()

Merge percentiles state.

new/0

new() -> state()

Create percentiles state.


Generated by EDoc