资源简介
计算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算法
相关资源
- 图像降噪Matlab代码
- ROC曲线 matlab实现
- ROC曲线MATLAB程序
- Digital Signal Processing Using Matlab v4.0 (
- Matlab Toolbox Signal Processing
- IMAGE_MATLAB_GUI
- Multirate Filtering for Digital Signal Process
- radarsignalanalysisandprocessingusingmatlab.pd
- Dirichlet Process Mixture Models(DPMM)
- dirichlet process
- Biosignal and biomedical image processing matl
- Solutions Manual for Digital Signal Processing
- Quaternion and Octonion Color Image Processing
- SAR-Signal-Processing-with-Matlab
- Gonzalez_2009_Digital Image Processing Using M
- Digital Signal Processing Using MATLAB 3rd Edi
- Statistical and Adaptive Signal Processing 书和
- Synthetic Aperture Radar Signal Processing wit
- SAR signal processing with MATLAB 书籍 对应代
- synthetic aperture radar signal processing wit
- Fundamentals of Statistical Signal Processing
- Digital Image Processing Using Matlab_2ed_Gonz
- 基于MATLAB的金属表面缺陷分类与测量
- Synthetic Aperture Radar Signal Processing wit
- MATLAB Image Processing Toolbox官方教程
- 高斯过程回归matlab代码
- MATLAB图像处理能力提高与应用案例
- Image Processing ToolBox
- Pearson-Digital Image Processing, 4th.Editio
- kkphoon.Simulation of second-order processes u
评论
共有 条评论