资源简介
使用matlab 开发的分类工具箱,包含svm,plsda ,knn,simca ,lda等,可以直接使用,方便简洁。源代码完整,不容错过。
代码片段和文件信息
function class_param = calc_class_param(class_calcclass)
% calc_class_param calculates classification parameters:
% error rate non-error rate specificity precision and sensitivity
%
% class_param = calc_class_param(class_calcclass);
%
% input:
% class class vector [samples x 1]
% class_calc calculated class vector [1 x n]
%
% output:
% class_param structure containing confusion matrix error rate non-error rate
% accuracy specificity precision and sensitivity
%
% The main routine is class_gui
%
% Note that a detailed HTML help is provided with the toolbox.
% See the HTML HELP files (help.htm) for futher details and examples
%
% Classification toolbox for MATLAB
% version 4.0 - October 2015
% Davide Ballabioabout
% Milano Chemometrics and QSAR Research Group
% http://michem.disat.unimib.it/chm/
num_class = max([max(class) max(class_calc)]);
nobj = size(class1);
conf_mat = zeros(num_classnum_class+1);
for g = 1:num_class
in_class = find(class==g);
for k = 1:num_class
conf_mat(gk) = length(find(class_calc(in_class) == k));
end
conf_mat(gnum_class + 1) = length(find(class_calc(in_class) == 0));
end
% sensitivity specificity precision class error accuracy
accuracy = 0;
for g = 1:num_class
if sum(conf_mat(:g)) > 0
precision(g) = conf_mat(gg)/sum(conf_mat(:g));
sensitivity(g) = conf_mat(gg)/sum(conf_mat(g1:num_class));
else
precision(g) = 0;
sensitivity(g) = 0;
end
in = ones(num_class1); in(g) = 0;
red_mat = conf_mat(find(in)1:num_class);
specificity(g) = 0;
for k = 1:size(red_mat2)
if k ~= g; specificity(g) = specificity(g) + sum(red_mat(:k)); end;
end
if sum(sum(red_mat)) > 0
specificity(g) = specificity(g)/sum(sum(red_mat));
else
specificity(g) = 0;
end
false_negative_rate(g) = 1 - sensitivity(g);
false_positive_rate(g) = 1 - specificity(g);
accuracy = accuracy + conf_mat(gg);
end
accuracy = accuracy/sum(sum(conf_mat(:1:num_class)));
% error rates
not_ass = sum(conf_mat(:end))/nobj;
ner = mean(sensitivity);
er = 1 - ner;
class_param.conf_mat = conf_mat;
class_param.ner = ner;
class_param.er = er;
class_param.accuracy = accuracy;
class_param.not_ass = not_ass;
class_param.precision = precision;
class_param.sensitivity = sensitivity;
class_param.specificity = specificity;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-03-21 16:10 classification_toolbox_4.0\classification_toolbox_4.0\
文件 2495 2015-10-14 14:45 classification_toolbox_4.0\classification_toolbox_4.0\calc_class_param.m
文件 1083 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\calc_qt_limits.m
文件 907 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\calc_reg_param.m
文件 4627 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\cartcv.m
文件 1632 2015-10-22 15:13 classification_toolbox_4.0\classification_toolbox_4.0\cartfit.m
文件 743 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\cartpred.m
文件 31313 2015-10-22 11:18 classification_toolbox_4.0\classification_toolbox_4.0\class_gui.fig
文件 88652 2015-11-05 13:18 classification_toolbox_4.0\classification_toolbox_4.0\class_gui.m
文件 192 2016-04-11 19:42 classification_toolbox_4.0\classification_toolbox_4.0\class_text.mat
文件 2427 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\dacompsel.m
文件 5710 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\dacv.m
文件 4290 2015-10-22 15:19 classification_toolbox_4.0\classification_toolbox_4.0\dafit.m
文件 2865 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\dapred.m
文件 1678 2015-10-14 14:51 classification_toolbox_4.0\classification_toolbox_4.0\data_pretreatment.m
文件 1117 2015-10-14 12:06 classification_toolbox_4.0\classification_toolbox_4.0\help.htm
目录 0 2017-03-21 16:10 classification_toolbox_4.0\classification_toolbox_4.0\help\
文件 8023 2015-11-05 13:27 classification_toolbox_4.0\classification_toolbox_4.0\help\classparameters.htm
文件 2136 2015-03-05 17:54 classification_toolbox_4.0\classification_toolbox_4.0\help\download.htm
文件 12281 2015-10-14 11:11 classification_toolbox_4.0\classification_toolbox_4.0\help\example.htm
文件 9259 2013-04-04 11:55 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_01.gif
文件 5246 2013-04-04 11:52 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_02.gif
文件 3186 2013-04-04 11:54 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_03.gif
文件 7228 2013-04-04 11:57 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_04.gif
文件 11294 2013-04-04 11:57 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_05.gif
文件 5330 2013-04-04 11:58 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_06.gif
文件 7335 2013-04-04 12:00 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_07.gif
文件 3165 2013-04-04 12:01 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_08.gif
文件 4771 2013-04-04 12:01 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_09.gif
文件 8197 2013-04-04 12:03 classification_toolbox_4.0\classification_toolbox_4.0\help\example_plsda_10.gif
文件 589 2013-10-02 15:36 classification_toolbox_4.0\classification_toolbox_4.0\help\footer.htm
............此处省略111个文件信息
- 上一篇:matlab迭代学习控制算法程序
- 下一篇:汽车租赁系统 uml
相关资源
- matlab迭代学习控制算法程序
- 基于离散Hopfield网络的车牌识别系统代
- 图像分裂合并的matlab实现.
- matlab FFT变换
- 基于matlab的随机过程仿真
- MATLAB的梯度法,内点法,外点法,罚
- 支持向量机的matlab代码
- MATLAB小波分解
- 平行束投影重建算法MATLAB程序——D
- 光纤光栅耦合模算法的MATLAB代码
- MSK 调制与平方环解调MATALB程序,有详
- 基于MATLAB的飞行仿真
- MATLAB直方图全局阈值双峰自动分割
- 格雷码转二进制码
- matlab 粗糙集属性约简
- lpc在matlab中的实现
- 基于MATLAB的整车工况仿真程序
- matlab粒子群算法工具箱
- matlab_radon图像重建
- 永磁同步电机离线辨识
- 循环平稳信号处理完整的Matlab工具箱
- matlab混沌工具箱211907
- Matlab数字图像处理 大作业
- lbp matlab程序中的getmapping文件
- matlab批量根据鼠标选中矩形区域剪切
- DMC算法在matlab中运行
- 一份用MATLAB编制电机效率map图的程序
- 贝叶斯分类器matlab实现
- 数字信号处理仿真,经典谱估计matl
- 小波变换降噪处理
评论
共有 条评论