RobustScaling

class geoanalytics.normalization.RobustScaling.RobustScaling(dataframe)[source]

Bases: object

About this algorithm

Description:

Robust Scaling normalizes features using statistics that are robust to outliers (median and interquartile range). This scaling method is useful when the dataset contains many outliers, providing better scaling than MinMax or Standard Scalers.

Parameters:
  • dataframe (pd.DataFrame): Input DataFrame with ‘x’, ‘y’ coordinates and feature columns.

Attributes:
  • df (pd.DataFrame): Input DataFrame with standardized column names ‘x’, ‘y’, and features.

  • normalizedDF (pd.DataFrame): DataFrame containing scaled features along with coordinates.

  • startTime, endTime (float): Timestamps tracking transformation execution.

  • memoryUSS, memoryRSS (float): Memory usage in kilobytes during execution.

Execution methods

Calling from a Python program

import pandas as pd

from geoanalytics.normalization import RobustScaling

df = pd.read_csv("input.csv")

scaler = RobustScaling(df)

normalized_df = scaler.run()

scaler.getRuntime()

scaler.getMemoryUSS()

scaler.getMemoryRSS()

scaler.save("RobustScaling.csv")

Credits

Developed by Raashika and M. Charan Teja, supervised by Professor Rage Uday Kiran.

getMemoryRSS()[source]

Prints the memory usage (RSS) of the process in kilobytes.

getMemoryUSS()[source]

Prints the memory usage (USS) of the process in kilobytes.

getRuntime()[source]

Prints the total runtime of the clustering algorithm.

run()[source]

Executes the RobustScaler normalization on the dataset.

Returns:

DataFrame with ‘x’, ‘y’, and robust scaled feature columns.

Return type:

pd.DataFrame

save(outputFile='RobustScaling.csv')[source]

Saves the Normalized DataFrame to a CSV file.