I have written AOC_Curve:
X_train,X_test,Y_train,Y_test=train_test_split(X,Y,test_size=.20,random_state=1)
# AUC and ROC for the training data
from sklearn.model_selection import *
from sklearn.linear_model import *
# predict probabilities
probs = reg_dt_model.predict_proba(X_train)
# keep probabilities for the positive outcome only
probs = probs[:, 1]
# calculate AUC
from sklearn.metrics import roc_auc_score
auc = roc_auc_score(y_true, probs,average=None, multi_class="ovr")
print('AUC: %.3f' % auc)
# calculate roc curve
from sklearn.metrics import roc_curve
fpr, tpr, thresholds = roc_curve(y_true, probs)
plt.plot([0, 1], [0, 1], linestyle='--')
# plot the roc curve for the model
plt.plot(fpr, tpr, marker='.')
# show the plot
plt.show()
But i am getting error :
Singleton array array(130, dtype=int64) cannot be considered a valid collection.
Please advise.
Regards Rohit