MICEImputation
- class geoanalytics.imputation.MICEImputation.MICEImputation(dataframe)[source]
Bases:
objectAbout this algorithm
- Description:
MICEImputation uses fancyimpute.IterativeImputer to perform MICE-based missing data imputation via chained equations. It excludes ‘x’ and ‘y’ during imputation and reports runtime and memory usage.
- Parameters:
dataframe (pandas.DataFrame) – Input dataset with ‘x’, ‘y’ spatial columns followed by numerical features, possibly with missing values.
- Attributes:
df (pandas.DataFrame) – Internal copy of the original input DataFrame with reordered columns.
imputedDF (pandas.DataFrame) – Final DataFrame after applying MICE Imputation.
startTime (float) – Start time of the imputation.
endTime (float) – End time of the imputation.
memoryUSS (float) – Memory usage (USS in KB) during the run.
memoryRSS (float) – Memory usage (RSS in KB) during the run.
Execution methods
Calling from a Python program
from geoanalytics.imputation import MICEImputation as alg import pandas as pd df = pd.read_csv('dataset.csv') obj = alg.MICEImputation(df) imputed_df = obj.run() obj.save('MICEImputation.csv') obj.getRuntime() obj.getMemoryUSS() obj.getMemoryRSS() print("Data after MICE Imputation:", imputed_df)
Credits
The complete program was written by and revised by under the supervision of Professor Rage Uday Kiran.