MATLAB-based ROC Curves
2014-01-01 16:56
411 查看
DETAILS ABOUT ROC (RECEIVER OPERATING CHARACTERISTIC) CURVES CAN BE REFEREED FROM
HERE (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
HERE (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鼠标选取ROC区域
- Matlab绘图——Draw ROC Curve
- matlab下 ROC和AUC的实现
- 【转】 Matlab Code = 全变分图像去噪方法(Total Variation-based Image Denoising)
- matlab示例程序--Motion-Based Multiple Object Tracking--卡尔曼多目标跟踪程序--解读
- RevitAPI: Rebar.CreateFromCurves抛出异常: Unable to create a RebarShape based on the given curves
- 多分类问题中每一类的Precision-Recall Curve曲线以及ROC的Matlab画法
- PRC & ROC matlab程序
- 多分类问题中每一类的Precision-Recall Corve曲线以及ROC的Matlab画法
- Precision-Recall and ROC Curves
- MATLAB Code of SOM Neural Network Based Method for Task Assignment
- Matlab Code = 全变分图像去噪方法(Total Variation-based Image Denoising)
- 使用Matlab 画 ROC需要哪些数据
- 多分类问题中每一类的Precision-Recall Curve曲线以及ROC的Matlab画法
- 基于密度的空间的数据聚类方法DBSCAN(Density-Based Spatial Clustering of Applications with Noise)matlab实现
- Matlab的Python实现Scipy和Matplotlib简介
- matlab演奏卡农 Cripple Pachebel's Canon on Matlab
- matlab和C++混合编程
- Matlab快捷键
- MatLab安装中出现的问题