NumberImputation
- class geoanalytics.imputation.NumberImputation.NumberImputation(dataframe)[source]
Bases:
objectAbout this algorithm
- Description:
Number Imputation replaces missing values in the dataset with a specified fixed numeric value. This is a straightforward method useful when you want to impute all missing values with a constant number, such as zero or any other specified numeric value.
- Parameters:
Dataset (pandas DataFrame) must be provided during object initialization.
number (int or float) to replace missing values during the run() method (default is 0).
- Attributes:
df (pd.DataFrame) – The input data with ‘x’, ‘y’ coordinates and features.
imputedDF (pd.DataFrame) – DataFrame after filling in missing values with the specified number.
startTime, endTime (float) – Variables to track execution time.
memoryUSS, memoryRSS (float) – Memory usage of the imputation process in kilobytes.
Execution methods
Calling from a Python program
import pandas as pd from geoanalytics.imputation import NumberImputation df = pd.read_csv("input.csv") number_imputer = NumberImputation(df) imputed_df = number_imputer.run(number=0) number_imputer.getRuntime() number_imputer.getMemoryUSS() number_imputer.getMemoryRSS() number_imputer.save('NumberImputation.csv')
Credits
This implementation was created by Raashika and revised by M.Charan Teja under the guidance of Professor Rage Uday Kiran.