20 lines
565 B
Python
20 lines
565 B
Python
import os
|
|
import pandas
|
|
|
|
from utils import missing_value_handler, scaling_handler
|
|
|
|
# STEP 1: handle missing values + remove id column + robust scaling
|
|
|
|
if not os.path.exists("./data/Ketamin_icp_cleaned.csv"):
|
|
data_path = "./data/Ketamine_icp.csv"
|
|
data_frame_imputed = missing_value_handler(data_path)
|
|
|
|
data_frame = scaling_handler(data_frame_imputed, method="robust_scaling")
|
|
|
|
data_frame.to_csv("./data/Ketamin_icp_cleaned.csv", index=False)
|
|
else:
|
|
data_frame = pandas.read_csv("./data/Ketamin_icp_cleaned.csv")
|
|
|
|
|
|
# STEP 2: Train and Test models
|