.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "checks_gallery/tabular/performance/plot_roc_report.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_checks_gallery_tabular_performance_plot_roc_report.py: ROC Report ********** .. GENERATED FROM PYTHON SOURCE LINES 8-10 Imports ======= .. GENERATED FROM PYTHON SOURCE LINES 10-27 .. code-block:: default import warnings import pandas as pd from sklearn.datasets import load_iris from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from deepchecks.tabular import Dataset from deepchecks.tabular.checks.performance import RocReport def custom_formatwarning(msg, *args, **kwargs): return str(msg) + '\n' warnings.formatwarning = custom_formatwarning .. GENERATED FROM PYTHON SOURCE LINES 28-30 Generating data =============== .. GENERATED FROM PYTHON SOURCE LINES 30-42 .. code-block:: default iris = load_iris(as_frame=True) clf = LogisticRegression(penalty='none') frame = iris.frame X = iris.data y = iris.target X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=55) clf.fit(X_train, y_train) ds = Dataset(pd.concat([X_test, y_test], axis=1), features=iris.feature_names, label='target') .. GENERATED FROM PYTHON SOURCE LINES 43-45 Running ``roc_report`` Check ============================ .. GENERATED FROM PYTHON SOURCE LINES 45-48 .. code-block:: default check = RocReport() .. GENERATED FROM PYTHON SOURCE LINES 49-51 .. code-block:: default check.run(ds, clf) .. raw:: html

ROC Report

Calculate the ROC curve for each class.

Additional Outputs
The marked points are the optimal threshold cut-off points. They are determined using Youden's index defined as sensitivity + specificity - 1


.. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.035 seconds) .. _sphx_glr_download_checks_gallery_tabular_performance_plot_roc_report.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_roc_report.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_roc_report.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_