mendevi.database.normalize

Extract simple constants in order to ‘normalize’ the values.

Functions

avg_slices(dt_array, sample_array, duration)

Return the average sample for several overlapping windows of size duration.

p_static_p_core(database)

Estimate for each hostname, the model P = P_static + c * P_core.

Details

mendevi.database.normalize.avg_slices(dt_array: ndarray, sample_array: ndarray, duration: float) list[float][source]

Return the average sample for several overlapping windows of size duration.

mendevi.database.normalize.p_static_p_core(database: str | bytes | Path) dict[str, tuple][source]

Estimate for each hostname, the model P = P_static + c * P_core.

Parameters

databasepathlike

The path of the existing database to be updated.

Returns

cstdict

To each hostname, associate the estimation of (p_static, p_core).

Examples

>>> from mendevi.database.normalize import p_static_p_core
>>> p_static_p_core("/data/dataset/merge.db")
>>>