PowerTransform

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

Bases: object

About this algorithm

Description:

Power Transformation using the Yeo-Johnson method stabilizes variance and makes data more Gaussian-like. It is especially useful for features with non-normal distributions. This class provides runtime and memory usage tracking alongside the transformation.

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 transformed features and coordinates.

  • startTime, endTime (float) – Timing markers for the transformation process.

  • memoryUSS, memoryRSS (float) – Memory usage metrics in kilobytes.

Execution methods

Calling from a Python program

import pandas as pd

from geoanalytics.normalization import PowerTransform

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

scaler = PowerTransform(df)

normalized_df = scaler.run()

scaler.getRuntime()

scaler.getMemoryUSS()

scaler.getMemoryRSS()

scaler.save("PowerTransform.csv")

Credits

This implementation was created by Raashika and revised by M. Charan Teja under the guidance of 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 Yeo-Johnson power transformation on the dataset.

Returns:

DataFrame with ‘x’, ‘y’, and power transformed feature columns.

Return type:

pd.DataFrame

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

Saves the Normalized DataFrame to a CSV file.