资源简介
基于MATLAB的KAPPA系数计算。The confusion matrix was used to describe the classification accuracy and to characterize the errors. Landis and Koch (1977) classified Kappa values into different categories: 0-0.20, 0.21-0.40, 0.41-0.60, 0.61-0.80 and 0.81-1, which indicates slight, fair, moderate, substantial and almost perfect agreements, respectively.
代码片段和文件信息
function kappa(varargin)
% KAPPA: This function computes the Cohen‘s kappa coefficient.
% Cohen‘s kappa coefficient is a statistical measure of inter-rater
% reliability. It is generally thought to be a more robust measure than
% simple percent agreement calculation since k takes into account the
% agreement occurring by chance.
% Kappa provides a measure of the degree to which two judges A and B
% concur in their respective sortings of N items into k mutually exclusive
% categories. A ‘judge‘ in this context can be an individual human being a
% set of individuals who sort the N items collectively or some non-human
% agency such as a computer program or diagnostic test that performs a
% sorting on the basis of specified criteria.
% The original and simplest version of kappa is the unweighted kappa
% coefficient introduced by J. Cohen in 1960. When the categories are
% merely nominal Cohen‘s simple unweighted coefficient is the only form of
% kappa that can meaningfully be used. If the categories are ordinal and if
% it is the case that category 2 represents more of something than category
% 1 that category 3 represents more of that same something than category
% 2 and so on then it is potentially meaningful to take this into
% account weighting each cell of the matrix in accordance with how near it
% is to the cell in that row that includes the absolutely concordant items.
% This function can compute a linear weights or a quadratic weights.
%
% Syntax: kappa(XWALPHA)
%
% Inputs:
% X - square data matrix
% W - Weight (0 = unweighted; 1 = linear weighted; 2 = quadratic
% weighted; -1 = display all. Default=0)
% ALPHA - default=0.05.
%
% Outputs:
% - Observed agreement percentage
% - Random agreement percentage
% - Agreement percentage due to true concordance
% - Residual not random agreement percentage
% - Cohen‘s kappa
% - kappa error
% - kappa confidence interval
% - Maximum possible kappa
% - k observed as proportion of maximum possible
% - k benchmarks by Landis and Koch
% - z test results
%
% Example:
%
% x=[88 14 18; 10 40 10; 2 6 12];
%
% Calling on Matlab the function: kappa(x)
%
% Answer is:
%
% UNWEIGHTED COHEN‘S KAPPA
% --------------------------------------------------------------------------------
% Observed agreement (po) = 0.7000
% Random agreement (pe) = 0.4100
% Agreement due to true concordance (po-pe) = 0.2900
% Residual not random agreement (1-pe) = 0.5900
% Cohen‘s kappa = 0.4915
% kappa error = 0.0549
% kappa C.I. (alpha = 0.0500) = 0.3839 0.5992
% Maximum possible kappa given the observed marginal frequencies = 0.8305
% k observed as proportion of maximum possible = 0.5918
% Moderate agreement
% Variance = 0.0031 z (k/sqrt(var)) = 8.8347 p
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7393 2009-05-20 12:38 kappa.m
文件 1338 2009-12-23 14:24 license.txt
- 上一篇:构造均值为a方差为b的高斯白噪声
- 下一篇:归一化8点算法-MATLAB代码
相关资源
- 归一化8点算法-MATLAB代码
- 构造均值为a方差为b的高斯白噪声
- FCM模糊聚类matlab代码
- 室内定位算法matlab程序
- 基于4个特征的阴影检测算法
- GN算法,matlab
- ZEMAX 与MATLAB的接口技术
- 恒压频比交流调速MATLAB仿真
- 可以方便地用来手动标记训练样本的
- 基于MATLAB的KL人脸识别程序可运行.r
- 模糊综合评价matlab程序
- matlabcode(与瑞利信道相关的OFDM仿真)
- Kalman滤波原理及源码(matlab).rar
- SSD+SAD+NCC立体匹配算法matlab代码
- 步进电机--matlab--参考模型自适应
- matlab 多小区仿真
- MATLAB粒子群算法仿真
- Matlab GUI实现的指纹特征提取与编辑
- WOLA加权叠加滤波器组算法,matlab
- 牛拉法潮流计算Matlab程序
- SOM matlab
- 数字信号处理——基于计算机的方法
- 拉曼光谱特征峰提取的蚁群算法的M
- 自适应均衡器仿真
- 用matlab编写图像插值算法
- 用matlab打造自己的注册机.zip
- matlab坐标平移旋转源代码.zip
- MATLABR2016b破解文件
- 疏散问题元胞自动机仿真方法.pdf
- 车载网络共享资源分配matlab程序
评论
共有 条评论