Untitled
unknown
python
2 months ago
502 B
1
Indexable
Never
APARTADO 3 predictions = None # change this # YOUR CODE HERE from sklearn.model_selection import cross_val_predict from sklearn.metrics import roc_curve from sklearn.metrics import auc, RocCurveDisplay predictions = cross_val_predict(estimator=model, X=X, y=y, cv=10, method='predict_proba') fpr, tpr, threshhold = roc_curve(y_true=y, y_score=predictions[:,1]) roc_auc = auc(fpr, tpr) display = RocCurveDisplay(fpr=fpr, tpr=tpr, roc_auc=roc_auc, estimator_name='LogisticRegression') display.plot()