imputegap.recovery.evaluation package

The imputegap.recovery.evaluation package provides various utility functions and tools for handling algorithm parameters, evaluation, and other operations in the imputation process.

Submodules

Modules

class imputegap.recovery.evaluation.Evaluation(input_data, recov_data, incomp_data)[source]

Bases: object

A class to evaluate the performance of imputation algorithms by comparing imputed time series with the ground truth.

Methods

compute_all_metrics():

Compute various evaluation metrics (RMSE, MAE, MI, CORRELATION) for the imputation.

compute_rmse():

Compute the Root Mean Squared Error (RMSE) between the ground truth and the imputed values.

compute_mae():

Compute the Mean Absolute Error (MAE) between the ground truth and the imputed values.

compute_mi():

Compute the Mutual Information (MI) between the ground truth and the imputed values.

compute_correlation():

Compute the Pearson correlation coefficient between the ground truth and the imputed values.

compute_all_metrics()[source]

Compute a set of evaluation metrics for the imputation based on the ground truth and contamination data.

The metrics include RMSE, MAE, Mutual Information (MI), and Pearson Correlation.

Returns

dict

A dictionary containing the computed metrics: - “RMSE”: Root Mean Squared Error - “MAE”: Mean Absolute Error - “MI”: Mutual Information - “CORRELATION”: Pearson Correlation Coefficient

compute_correlation()[source]

Compute the Pearson Correlation Coefficient between the ground truth and imputed values for NaN positions in contamination.

Pearson Correlation measures the linear relationship between the ground truth and imputed values, with 1 being a perfect positive correlation and -1 a perfect negative correlation.

Returns

float

The Pearson correlation coefficient for NaN positions in the contamination dataset.

compute_mae()[source]

Compute the Mean Absolute Error (MAE) between the ground truth and imputed values for NaN positions in contamination.

The MAE measures the average magnitude of the error in absolute terms, making it more robust to outliers than RMSE.

Returns

float

The MAE value for NaN positions in the contamination dataset.

compute_mi()[source]

Compute the Mutual Information (MI) between the ground truth and imputed values for NaN positions in contamination.

MI measures the amount of shared information between the ground truth and the imputed values, indicating how well the imputation preserves the underlying patterns of the data.

Returns

float

The mutual information (MI) score for NaN positions in the contamination dataset.

compute_rmse()[source]

Compute the Root Mean Squared Error (RMSE) between the ground truth and imputed values for NaN positions in contamination.

The RMSE measures the average magnitude of the error between the imputed values and the ground truth, giving higher weight to large errors.

Returns

float

The RMSE value for NaN positions in the contamination dataset.

Submodule Documentation

imputegap.recovery.evaluation module

class imputegap.recovery.evaluation.Evaluation(input_data, recov_data, incomp_data)[source]

Bases: object

A class to evaluate the performance of imputation algorithms by comparing imputed time series with the ground truth.

Methods

compute_all_metrics():

Compute various evaluation metrics (RMSE, MAE, MI, CORRELATION) for the imputation.

compute_rmse():

Compute the Root Mean Squared Error (RMSE) between the ground truth and the imputed values.

compute_mae():

Compute the Mean Absolute Error (MAE) between the ground truth and the imputed values.

compute_mi():

Compute the Mutual Information (MI) between the ground truth and the imputed values.

compute_correlation():

Compute the Pearson correlation coefficient between the ground truth and the imputed values.

compute_all_metrics()[source]

Compute a set of evaluation metrics for the imputation based on the ground truth and contamination data.

The metrics include RMSE, MAE, Mutual Information (MI), and Pearson Correlation.

Returns

dict

A dictionary containing the computed metrics: - “RMSE”: Root Mean Squared Error - “MAE”: Mean Absolute Error - “MI”: Mutual Information - “CORRELATION”: Pearson Correlation Coefficient

compute_correlation()[source]

Compute the Pearson Correlation Coefficient between the ground truth and imputed values for NaN positions in contamination.

Pearson Correlation measures the linear relationship between the ground truth and imputed values, with 1 being a perfect positive correlation and -1 a perfect negative correlation.

Returns

float

The Pearson correlation coefficient for NaN positions in the contamination dataset.

compute_mae()[source]

Compute the Mean Absolute Error (MAE) between the ground truth and imputed values for NaN positions in contamination.

The MAE measures the average magnitude of the error in absolute terms, making it more robust to outliers than RMSE.

Returns

float

The MAE value for NaN positions in the contamination dataset.

compute_mi()[source]

Compute the Mutual Information (MI) between the ground truth and imputed values for NaN positions in contamination.

MI measures the amount of shared information between the ground truth and the imputed values, indicating how well the imputation preserves the underlying patterns of the data.

Returns

float

The mutual information (MI) score for NaN positions in the contamination dataset.

compute_rmse()[source]

Compute the Root Mean Squared Error (RMSE) between the ground truth and imputed values for NaN positions in contamination.

The RMSE measures the average magnitude of the error between the imputed values and the ground truth, giving higher weight to large errors.

Returns

float

The RMSE value for NaN positions in the contamination dataset.