Changes in createDataset.py

This commit is contained in:
s487179 2023-05-13 11:25:49 +02:00
parent 922b6aca7e
commit d538bc3f9b

View File

@ -4,8 +4,8 @@ from sklearn.model_selection import train_test_split
home_loan_train = pd.read_csv('loan_sanction_train.csv') home_loan_train = pd.read_csv('loan_sanction_train.csv')
home_loan_test = pd.read_csv('loan_sanction_test.csv') home_loan_test = pd.read_csv('loan_sanction_test.csv')
home_loan_val_final, home_loan_test_final = train_test_split(home_loan_test, test_size=0.5, random_state=1) home_loan_train_final, home_loan_test = train_test_split(home_loan_train, test_size=0.2, random_state=1)
home_loan_train_final = home_loan_train home_loan_test_final, home_loan_val_final = train_test_split(home_loan_test, test_size=0.5, random_state=1)
numeric_cols_train = home_loan_train_final.select_dtypes(include='number').columns numeric_cols_train = home_loan_train_final.select_dtypes(include='number').columns
numeric_cols_test = home_loan_test_final.select_dtypes(include='number').columns numeric_cols_test = home_loan_test_final.select_dtypes(include='number').columns