imputegap.algorithms.min_impute package¶
The imputegap.algorithms.min_impute package contains various imputation algorithms used for handling missing values in time series data.
Submodules¶
Modules¶
- imputegap.algorithms.min_impute.min_impute(incomp_data, params=None)[source]¶
Impute NaN values with the minimum value of the time series.
Parameters¶
- incomp_datanumpy.ndarray
The input time series with contamination (missing values represented as NaNs).
- paramsdict, optional
Optional parameters for the algorithm. If None, the minimum value from the contamination is used (default is None).
Returns¶
- numpy.ndarray
The imputed matrix where NaN values have been replaced with the minimum value from the time series.
Notes¶
This function finds the minimum non-NaN value in the time series and replaces all NaN values with this minimum value. It is a simple imputation technique for filling missing data points in a dataset.
Example¶
>>> incomp_data = np.array([[1, 2, np.nan], [4, np.nan, 6]]) >>> recov_data = min_impute(incomp_data) >>> print(recov_data) array([[1., 2., 1.], [4., 1., 6.]])