{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Detection error tradeoff (DET) curve\n\nIn this example, we compare receiver operating characteristic (ROC) and\ndetection error tradeoff (DET) curves for different classification algorithms\nfor the same classification task.\n\nDET curves are commonly plotted in normal deviate scale.\nTo achieve this the DET display transforms the error rates as returned by the\n:func:`~sklearn.metrics.det_curve` and the axis scale using\n:func:`scipy.stats.norm`.\n\nThe point of this example is to demonstrate two properties of DET curves,\nnamely:\n\n1. It might be easier to visually assess the overall performance of different\n classification algorithms using DET curves over ROC curves.\n Due to the linear scale used for plotting ROC curves, different classifiers\n usually only differ in the top left corner of the graph and appear similar\n for a large part of the plot. On the other hand, because DET curves\n represent straight lines in normal deviate scale. As such, they tend to be\n distinguishable as a whole and the area of interest spans a large part of\n the plot.\n2. DET curves give the user direct feedback of the detection error tradeoff to\n aid in operating point analysis.\n The user can deduct directly from the DET-curve plot at which rate\n false-negative error rate will improve when willing to accept an increase in\n false-positive error rate (or vice-versa).\n\nThe plots in this example compare ROC curves on the left side to corresponding\nDET curves on the right.\nThere is no particular reason why these classifiers have been chosen for the\nexample plot over other classifiers available in scikit-learn.\n\n
- See :func:`sklearn.metrics.roc_curve` for further information about ROC\n curves.\n\n - See :func:`sklearn.metrics.det_curve` for further information about\n DET curves.\n\n - This example is loosely based on\n `sphx_glr_auto_examples_classification_plot_classifier_comparison.py`\n example.