MinMax

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

Bases: object

About this algorithm

Description:

Min-Max normalization scales each feature to a fixed range—typically [0, 1]—by subtracting the minimum and dividing by the range (max - min). It is useful when features are on different scales and bounded values are required for machine learning models. This class includes memory and runtime tracking.

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

Attributes:
  • df (pd.DataFrame) – Input DataFrame with renamed columns ‘x’, ‘y’, and features.

  • normalizedDF (pd.DataFrame) – Output DataFrame after min-max normalization.

  • startTime, endTime (float) – Runtime measurement markers.

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

Execution methods

Calling from a Python program

import pandas as pd

from geoanalytics.normalization import MinMax

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

scaler = MinMax(df)

normalized_df = scaler.run()

scaler.getRuntime()

scaler.getMemoryUSS()

scaler.getMemoryRSS()

scaler.save("MinMax.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 min-max normalization on the dataset using sklearn’s MinMaxScaler.

Returns:

DataFrame with ‘x’, ‘y’, and normalized feature columns.

Return type:

pd.DataFrame

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

Saves the Normalized DataFrame to a CSV file.