completeness#

openstef_beam.metrics.completeness(y: ndarray[tuple[Any, ...], dtype[floating]]) float[source]#

Calculate the completeness of data.

Completeness measures the proportion of non-missing data, providing insight into data availability and potential gaps in the data.

Parameters:

y (ndarray[tuple[Any, ...], dtype[floating]]) – Values with shape (num_samples,). May contain NaN for missing data.

Returns:

The completeness as a float in range [0, 1], where 1.0 means no missing data.

Return type:

float

Example

Basic usage with energy load data: >>> import numpy as np >>> y = np.array([100, 120, np.nan, 130, 105]) >>> completeness(y) 0.8

Parameters:

y (ndarray[tuple[Any, ...], dtype[floating]])

Return type:

float