I have this code which runs SMOTE and then getting roc_auc_score.
The issue is that every I run the code on the same dataset, I get different results.
How can I fix this? I need the same sample when ruining my code and the same results.
The ROC curve is also changing
y = df.target
X = df.drop('target', axis=1)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.30, random_state=27)
sm = SMOTE(random_state=27, sampling_strategy=1.0)
X_train, y_train = sm.fit_sample(X_train, y_train)
smote_nn =MLPClassifier(hidden_layer_sizes=(10, 10, 10), max_iter=1000).fit(X_train, y_train)
smote_pred_nn = smote_nn.predict_proba(X_test)[:,1]
false_positive_rate, true_positive_rate, threshold1 = roc_curve(y_test, smote_pred_nn)
print('roc_auc_score for NN: ', roc_auc_score(y_test, smote_pred_nn))
```