Skip to content

Instantly share code, notes, and snippets.

View ryancodingg's full-sized avatar
🎯
Focusing

Ryan Nguyen ryancodingg

🎯
Focusing
View GitHub Profile
#Split the data into training and test sets using Stratified splitting
X = df.drop(columns=['is_fraud'])
y = df['is_fraud']
X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, test_size = 0.3, random_state = 42)