Roccurve: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Donal
(Created page with "===Purpose=== Calculate and display ROC curve(s) for yknown and ypred. ===Synopsis=== : roc = roccurve(yknown, ypred, options) ===Description=== ROC curves can be used to as...")
 
imported>Donal
 
(5 intermediate revisions by the same user not shown)
Line 12: Line 12:


Cases:
Cases:
:If yknown is nx1 logical vector and ypred is nxm, then m roc curves are produced, one for each column of ypred. roc is a dataset nx(2*m), containing column-pairs of Specificity and Sensitivity for each yknown vs. ypred pairing.
:1. yknown is a logical vector with dimension (n,1) and ypred is (n,m), then m roc curves are produced, one for each column of ypred. roc is a dataset with size (n, 2*m) containing column-pairs of Specificity and Sensitivity for each yknown vs. ypred pairing.
:If yknown is nxm logical and ypred is nxm then m roc curves are produced, one for each pair of yknown and its corresponding ypred column.  roc is a dataset nx(2*m).
:2. yknown is (n,m) logical and ypred is (n,m) then m roc curves are produced, one for each pair of yknown and its corresponding ypred column.  roc is a dataset with size (n, 2*m).
:If yknown is multi-column, nxm, and ypred has a different number of columns, nxp, then an error is thrown.
:3. If yknown is multi-column, (n,m), and ypred has a different number of columns, (n,p), then an error is thrown.


====Inputs====
===Inputs===
* '''first''' = first input is this.
* '''yknown''' = (n,1) logical vector, or vector of only 0's and another integer or (n,m) logical vector.
* '''yknown''' = nx1 logical vector, or vector of only 0's and another integer or nxm logical vector.
* '''ypred''' = (n,m) double array, m columns of y predictions.
* '''ypred''' = nxm double array, m columns of y predictions.


====Outputs====
===Outputs===
* '''roc''' = Output is a dataset with the specificity/sensitivity data (roc).
* '''roc''' = Output is a dataset with the specificity/sensitivity data (roc).


====Options====
===Options===


options =  a structure array with the following fields:
options =  a structure array with the following fields:


* '''plots''': [ {'none'} | 'final' ] governs plotting of results, and
* '''plots''': [ {'none'} | 'final' ] governs plotting of results,  
* '''figure''': [ 'new' | 'gui' | figure_handle ] governs location for plot. 'new' plots onto a new figure. 'gui' plots using noninteger figure handle. A figure handle specifies the figure onto which the plot should be made.
* '''figure''': [ 'new' | 'gui' | figure_handle ] governs location for plot. 'new' plots onto a new figure. 'gui' plots using noninteger figure handle. A figure handle specifies the figure onto which the plot should be made.
* '''plotstyle''': [ 'roc' | 'threshold' | {'all'} ] governs type of plots.
* '''plotstyle''': [ 'roc' | 'threshold' | {'all'} ] governs type of plots.
Line 34: Line 33:
:plot. 'all' shows both types of plots on one figure (default).
:plot. 'all' shows both types of plots on one figure (default).
:Plot style can also be specified as 1 (which gives 'roc' plots) or 2 (which gives 'threshold' plots)
:Plot style can also be specified as 1 (which gives 'roc' plots) or 2 (which gives 'threshold' plots)
 
* '''showauc''': [{'on'} | 'off'] Controls drawing AUC value on ROC plot,
===Example===
* '''threshold''': [ [] ] Threshold value(s) to draw vertical dashed red line in Threshold plot(s) and place red circle(s) at on the ROC.
 
<pre>
>>This is an example
Error: does not exist
</pre>


===See Also===
===See Also===


[[baselinew]], [[deresolv]]
[[plsdaroc]]

Latest revision as of 22:45, 9 June 2014

Purpose

Calculate and display ROC curve(s) for yknown and ypred.

Synopsis

roc = roccurve(yknown, ypred, options)

Description

ROC curves can be used to assess the specificity and sensitivity for different predicted y-value thresholds, for input y known and predicted.

Cases:

1. yknown is a logical vector with dimension (n,1) and ypred is (n,m), then m roc curves are produced, one for each column of ypred. roc is a dataset with size (n, 2*m) containing column-pairs of Specificity and Sensitivity for each yknown vs. ypred pairing.
2. yknown is (n,m) logical and ypred is (n,m) then m roc curves are produced, one for each pair of yknown and its corresponding ypred column. roc is a dataset with size (n, 2*m).
3. If yknown is multi-column, (n,m), and ypred has a different number of columns, (n,p), then an error is thrown.

Inputs

  • yknown = (n,1) logical vector, or vector of only 0's and another integer or (n,m) logical vector.
  • ypred = (n,m) double array, m columns of y predictions.

Outputs

  • roc = Output is a dataset with the specificity/sensitivity data (roc).

Options

options = a structure array with the following fields:

  • plots: [ {'none'} | 'final' ] governs plotting of results,
  • figure: [ 'new' | 'gui' | figure_handle ] governs location for plot. 'new' plots onto a new figure. 'gui' plots using noninteger figure handle. A figure handle specifies the figure onto which the plot should be made.
  • plotstyle: [ 'roc' | 'threshold' | {'all'} ] governs type of plots.
'roc' and 'threshold' give only the specified type of
plot. 'all' shows both types of plots on one figure (default).
Plot style can also be specified as 1 (which gives 'roc' plots) or 2 (which gives 'threshold' plots)
  • showauc: [{'on'} | 'off'] Controls drawing AUC value on ROC plot,
  • threshold: [ [] ] Threshold value(s) to draw vertical dashed red line in Threshold plot(s) and place red circle(s) at on the ROC.

See Also

plsdaroc