资源简介
计算AUC,画出ROC曲线,给出各种统计参数
matlab 程序
代码片段和文件信息
function [ROCoutHR1]=nonestoproc(varargin)
% ROC - Receiver Operating Characteristics.
% The ROC graphs are a useful tecnique for organizing classifiers and
% visualizing their performance. ROC graphs are commonly used in medical
% decision making.
% If you have downloaded partest
% http://www.mathworks.com/matlabcentral/fileexchange/12705
% the routine will compute several data on test performance.
%
% Syntax: ROCout=roc(xthresholdsalphaverbose)
%
% Input: x - This is a Nx2 data matrix. The first column is the column of the data value;
% The second column is the column of the tag: unhealthy (1) and
% healthy (0).
% Thresholds - If you want to use all unique values in x(:1)
% then set this variable to 0 or leave it empty;
% else set how many unique values you want to use (min=3);
% alpha - significance level (default 0.05)
% verbose - if you want to see all reports and plots (0-no; 1-yes by
% default);
%
% Output: if verbose = 1
% the ROCplots the sensitivity and specificity at thresholds; the Area
% under the curve with Standard error and Confidence interval and
% comment Cut-off point for best sensitivity and specificity.
% (Optional) the test performances at cut-off point.
% if ROCout is declared you will have a struct:
% ROCout.AUC=Area under the curve (AUC);
% ROCout.SE=Standard error of the area;
% ROCout.ci=Confidence interval of the AUC
% ROCout.co=Cut off point for best sensitivity and sensibility
% ROCdata.xr and ROCdata.yr points for ROC plot
%
% USING roc WITHOUT ANY DATA IT WILL RUN A DEMO
%
% Created by Giuseppe Cardillo
% giuseppe.cardillo-edta@poste.it
%
% To cite this file this would be an appropriate format:
% Cardillo G. (2008) ROC curve: compute a Receiver Operating Characteristics curve.
% http://www.mathworks.com/matlabcentral/fileexchange/19950
%Input Error handling
args=cell(varargin);
nu=numel(args);
if isempty(nu)
error(‘Warning: almost the data matrix is required‘)
elseif nu>5
error(‘Warning: Max four input data are required‘)
end
default.values(1:nu) = args;
[x threshold alpha verbose tapy] = deal(default.values{:});
if isvector(x)
error(‘Warning: X must be a matrix‘)
end
if ~all(isfinite(x(:))) || ~all(isnumeric(x(:)))
error(‘Warning: all X values must be numeric and finite‘)
end
x(:2)=logical(x(:2));
if all(x(:2)==0)
error(‘Warning: there are only healthy subjects!‘)
end
if all(x(:2)==1)
error(‘Warning: there are only unhealthy subjects!‘)
end
if nu>=2
if isempty(threshold)
threshold=0;
else
if ~isscalar(threshold) || ~isnumeric(threshold) || ~isfinite(threshold)
error(‘Warning: it is required a numeric finite and scalar THRESHOLD value.‘);
end
if threshold ~= 0 && threshold <3
- 上一篇:基于matlab的红细胞提取
- 下一篇:matlab实现Romberg算法
相关资源
- DIRICHLET PROCESS
- Matlab code for Precision/Recall ROC Accuracy
- 利用遗传算法求Rosenbrock函数的极大值
- matlab 高斯过程回归模型 matlab Gaussia
- 图像滤波Matlab代码
- signal processing matlab 信号处理中需要的
- radar process toolbox 雷达信号处理的mat
- PRACHDETECTION
- 绘制roc曲线求AUC值
- Digital signal processing
- Synthetic Aperture Radar Signal Processing wit
- 图像的灰度直方图计算Matlab代码一
- mapminmax .m与boiler_process.m函数
- 最优阵列处理随书程序 (optimum arra
- plot roc matlab绘制ROC曲线代码
- Gaussian-process-regression 高斯过程回归及
- 前景检测程序(Foreground-detection-proc
- sound-process 计算例声音信号倍频程和
- 雷达数据处理概述 Radar-Data-Processing
- MATLAB_image_process_with_PDE 运用偏微分方
- Matlab-ECG-Processing 非常实用的基于Mat
- PDE_in_image_processing (1)MATLAB程序:其
- usb-carmer-matlab-RT-process 通过计算机us
- image_processing 本程序是基于Matlab的米粒
- DEAD-beat-microprocessor-control--
- The-SPSO-testingprocedure 基本的粒子群程序
- ImageProcess_ToolBox
- image-processing 用于图像处理上的相邻像
- MatlabImageProcessing 遥感图像的读取
- YanEER 输入类内、类间海明距离矩阵
评论
共有 条评论