-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPreprocessing.py
More file actions
28 lines (18 loc) · 868 Bytes
/
Copy pathPreprocessing.py
File metadata and controls
28 lines (18 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Project: Wids Datathon 2021 - Predicting Diabetes in ICU Patients
# File: Preprocessing.py
# Author: Bethany Thompson
# Date: January 2021
'''
Functions to prepare the cleaned df for modeling with data science best practices, such as splitting the data.
'''
# import needed to run functions
import pandas as pd
############################################## Preprocssing Function ##############################################
def preprocess_data(df):
return train, validate, test, train_scaled, validate_scaled, test_scaled
################################################# Helper Functions #################################################
# functions called within the main preprocess data function
def split_data(df):
return train, validate, test
def scale_data(train, validate, test):
return train_scaled, validate_scaled, test_scaled