imputegap.algorithms.mrnn package¶
The imputegap.algorithms.mrnn package contains various imputation algorithms used for handling missing values in time series data.
Submodules¶
Modules¶
- imputegap.algorithms.mrnn.mrnn(incomp_data, hidden_dim, learning_rate, iterations, sequence_length, logs=True)[source]¶
Perform imputation using the Multivariate Recurrent Neural Network (MRNN) algorithm.
Parameters¶
- incomp_datanumpy.ndarray
The input matrix with contamination (missing values represented as NaNs).
- hidden_dimint
The number of hidden dimensions in the MRNN model.
- learning_ratefloat
The learning rate for the training process.
- iterationsint
The number of iterations for training the MRNN model.
- sequence_lengthint
The length of sequences used within the MRNN model.
- logsbool, optional
Whether to log the execution time (default is True).
Returns¶
- numpy.ndarray
The imputed matrix with missing values recovered.
Notes¶
The MRNN algorithm is a machine learning-based approach for time series imputation, where missing values are recovered using a recurrent neural network structure.
This function logs the total execution time if logs is set to True.
Example¶
>>> recov_data = mrnn(incomp_data, hidden_dim=64, learning_rate=0.001, iterations=1000, sequence_length=7) >>> print(recov_data)
References¶
Yoon, W. R. Zame and M. van der Schaar, “Estimating Missing Data in Temporal Data Streams Using Multi-Directional Recurrent Neural Networks,” in IEEE Transactions on Biomedical Engineering, vol. 66, no. 5, pp. 1477-1490, May 2019, doi: 10.1109/TBME.2018.2874712. keywords: {Time measurement;Interpolation;Estimation;Medical diagnostic imaging;Correlation;Recurrent neural networks;Biomedical measurement;Missing data;temporal data streams;imputation;recurrent neural nets}