uf3.regression.least_squares.VarianceRecorder

class VarianceRecorder(mean=0, std=0, n=0)[source]

Bases: object

Convenience class for computing online variance and mean

Methods

update

param batch

n-dimensional data. For speed purposes,

update_with_components

Wrapper for dataframe with multiple columns of interest

update(batch: Collection) Tuple[source]
Parameters

batch (list or np.ndarray) – n-dimensional data. For speed purposes, dimensions are not checked for compatibility so caution is advised when working with multidimensional data. Statistics are computed along the first axis.

Returns

(current mean, current standard deviation, current entry count)

update_with_components(df, keys=None)[source]

Wrapper for dataframe with multiple columns of interest