MATLAB-based ROC Curves
来源:互联网 发布:sql设置默认值为0 编辑:程序博客网 时间:2024/04/29 19:19
DETAILS ABOUT ROC (RECEIVER OPERATING CHARACTERISTIC) CURVES CAN BE REFEREED FROMHERE (CHINESE). HOWEVER, NEW VERSION MATLAB SOFTWARE PROVIDES ROC API AS FOLLOWS.
>> help roc
roc Receiver operating characteristic.
The receiver operating characteristic is a metric used to check the quality of classifiers. For each class of a classifier, threshold values across the interval [0,1] are applied to outputs. For each threshold, two values are calculated, the True Positive Ratio (the number of outputs greater or equal to the threshold, divided by the number of one targets), and the False Positive Ratio (the number of outputs greater then the threshold, divided by the number of zero targets).
For single class problems, [TPR,FPR,TH] = roc(T,Y) takes a 1xQ target matrix T, where each element is either 1 or 0 indicating class membership or non-menbership respectively, and 1xQ outputs Y of values in the range [0,1].
It returns three 1xQ vectors: the true-positive/positive ratios TPR, the false-positive/negative ratios FPR, and the thresholds associated with each of those values TH.
For multi-class problems [TPR,FPR,TH] = roc(T,Y) takes an SxQ target matrix T, where each column contains a single 1 value, with all other elements 0. The row index of each 1 indicates which of S categories that vector represents. It also takes an SxQ output matrix Y, with values in the range [0,1]. The row indices of the largest elements in each column of Y indicate the most likely class.
In the multi-class case, all three values returned are 1xS cell arrays, so that TPR{i}, FPR{i} and TH{i} are the ratios and thresholds for the ith class.
roc(T,Y) can also take a boolean row vector T, and row vector Y, in which case two categories are represented by targets 1 and 0.
Here a network is trained to recognize iris flowers the roc is calculated and plotted.
[x,t] = iris_dataset;
net = patternnet(10);
net = train(net,x,t);
y = net(x);
[tpr,fpr,th] = roc(t,y)
plotroc(t,y)
See also plotroc, confusion
Reference page in Help browser
doc roc
- MATLAB-based ROC Curves
- Chapter5 .7 ROC Curves
- Precision-Recall and ROC Curves
- PRC & ROC matlab程序
- MATLAB画ROC曲线
- Curves
- MATLAB鼠标选取ROC区域
- matlab plotroc 画roc曲线
- ROC曲线及其matlab实现ROC曲线的绘画
- ROC曲线及其matlab实现ROC曲线的绘画
- ROC曲线及其matlab实现ROC曲线的绘画
- Matlab绘图——Draw ROC Curve
- ROC曲线的matlab技巧实现
- ROC曲线和AUC面积计算 matlab
- matlab ROC曲线(receiver operating characteristic)/AUC
- ROC曲线详解及matlab绘图实例
- matlab下 ROC和AUC的实现
- ROC曲线详解及matlab绘图实例
- 遍历目录的两种方法
- wifi-robots 教程(5~8)
- Leetcode: Next Permutation
- ExtJs4.2学习--Ext.tab.Panel 选项卡
- win7 32/64位安装MySQL详细步骤
- MATLAB-based ROC Curves
- phpmyadmin修改mysql的root密码,并正确登陆
- malloc的分配方法
- Android - ListView自定义Adapter中获得EditText的值
- Building a Redis Sentinel Client for Node.js
- 风热感冒的症状
- linux tar命令详解
- 2014.1.1
- Oracle中用sys用户登录