I'm trying to set
stratify = True, but somehow jupyter notebook says 'name 'y' is not defined'
X_train, X_test, y_train, y_test = train_test_split( loan.drop('Loan_Status', axis=1), loan['Loan_Status'], test_size=0.2, random_state=0, stratify=y)
Can anyone tell me what is the proper way to do it?
I'm using Scikit-learn v0.19.1 and have tried to set
stratify = True / y / 2 but none of them worked.