{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Receiver operator characteristic curves\n", "=======================================\n", "\n", "Receiver operator characteristic (ROC) curves illustrate the ability of\n", "per-nucleotide data to predict base-paired vs. single stranded nucleotides.\n", "RNAvigate's ROC plot draws the ROC curve for all values and for each\n", "nucleotide. RNAvigate calculates the area under the ROC curve (AUC) and\n", "displays it in the legend. Higher values, approaching 1, are better, while 0.5\n", "is not better than random guessing.\n", "\n", "In short, a threshold value splits the per-nucleotide data. The fraction of\n", "nucleotides above this threshold that are single-stranded is the True Positive\n", "Rate (TPR). The fraction of base-paired nucleotides that fall above the\n", "threshold is the False Positive Rate (FPR). The ROC curve connects the TPR and\n", "FPR of every possible threshold value. Perfect predictors, at some point,\n", "acheive a TPR of 1 and FPR of 0. The area under this curve would be 1." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import rnavigate as rnav\n", "from rnavigate.examples import rnasep_1, rnasep_2, rnasep_3, rnasep_4\n", "\n", "plot = rnav.plot_roc(\n", " samples=[rnasep_1, rnasep_2, rnasep_3, rnasep_4],\n", " structure=\"ss_ct\",\n", " profile=\"shapemap\",\n", ")\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "help(rnav.plot_roc)\n" ] } ], "metadata": { "kernelspec": { "display_name": "RNAvigate", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.2" } }, "nbformat": 4, "nbformat_minor": 2 }