imputegap.algorithms.iim package

The imputegap.algorithms.iim package contains various imputation algorithms used for handling missing values in time series data.

Submodules

Modules

imputegap.algorithms.iim.iim(incomp_data, number_neighbor, algo_code, logs=True)[source]

Perform imputation using the Iterative Imputation Method (IIM) algorithm.

Parameters

incomp_datanumpy.ndarray

The input matrix with contamination (missing values represented as NaNs).

number_neighborint

The number of neighbors to use for the K-Nearest Neighbors (KNN) classifier (default is 10).

algo_codestr

The specific action code for the IIM output. This determines the behavior of the algorithm.

logsbool, optional

Whether to log the execution time (default is True).

Returns

numpy.ndarray

The imputed matrix with missing values recovered.

Notes

The IIM algorithm works by utilizing K-Nearest Neighbors (KNN) to estimate missing values in time series data. Depending on the provided algo_code, different versions of the algorithm may be executed.

The function logs the total execution time if logs is set to True.

Example

>>> recov_data = iim(incomp_data, number_neighbor=10, algo_code="iim 2")
>>> print(recov_data)

References

A. Zhang, S. Song, Y. Sun and J. Wang, “Learning Individual Models for Imputation,” 2019 IEEE 35th International Conference on Data Engineering (ICDE), Macao, China, 2019, pp. 160-171, doi: 10.1109/ICDE.2019.00023. keywords: {Data models;Adaptation models;Computational modeling;Predictive models;Numerical models;Aggregates;Regression tree analysis;Missing values;Data imputation}