资源简介
混淆矩阵、准确率、召回率、精准率、ROC曲线计算和可视化
代码片段和文件信息
% Matlab package for statistics and visualization of classification results and many other problems.
%
% Author: Created by Piji Li (pagelee.sd@gmail.com)
% Blog: www.zhizhihu.com;
% QQ:379115886;
% Date: Dec. 2010
%% initialization
clc;
clear;
load num_in_class; % instance number of each class
load actual_label; % actual label of each instance
load predict_label; % predicted label of your experiments
load decision_values; % deccision values of each instance in your classification experiments(e.g. dec_values of Libsvm)
load name_class; % name of each class
%% compute and visualize the confusion matrix
addpath ConfusionMatrices; % package for computing confusion matrix
[confusion_matrix]=compute_confusion_matrix(predict_labelnum_in_classname_class);
%% compute and visualize the precision/recall curve and ROC
addpath PrecisionRecall;
label_or_decision=‘decision‘; % use label(‘label‘) as decision or decision_values(‘decision‘) as decision decision will be better.
PRC_or_ROC=0; % 0 for PRC 1 for ROC 2 for both;
compute_precision_recall(predict_labeldecision_valuesactual_labelnum_in_classlabel_or_decisionPRC_or_ROC);
%% compute accuracy and F-measure etc.
addpath AccuracyF;
classes = [1:max(max(actual_label)max(predict_label))];
fprintf(‘Begin computing confusaccuracynumcorrectprecisionrecallF...\n‘);
[confusaccuracynumcorrectprecisionrecallFPatNMAPNDCGatN]=compute_accuracy_F(actual_labelpredict_labelclasses)
fprintf(‘Finish.\n‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-11-28 15:56 Confusion matrix_Curve-56e520a\
目录 0 2017-11-28 15:56 Confusion matrix_Curve-56e520a\AccuracyF\
文件 1904 2012-06-22 14:13 Confusion matrix_Curve-56e520a\AccuracyF\compute_accuracy_F.m
目录 0 2017-11-28 15:56 Confusion matrix_Curve-56e520a\ConfusionMatrices\
文件 714 2012-06-22 14:13 Confusion matrix_Curve-56e520a\ConfusionMatrices\compute_confusion_matrix.m
文件 1032 2012-06-22 14:13 Confusion matrix_Curve-56e520a\ConfusionMatrices\draw_cm.m
文件 13953 2012-06-22 14:13 Confusion matrix_Curve-56e520a\ConfusionMatrices\rotateXLabels.m
目录 0 2017-11-28 15:56 Confusion matrix_Curve-56e520a\PrecisionRecall\
文件 1061 2012-06-22 14:13 Confusion matrix_Curve-56e520a\PrecisionRecall\compute_precision_recall.m
文件 3009 2012-06-22 14:13 Confusion matrix_Curve-56e520a\PrecisionRecall\draw_prc.m
文件 2654 2012-06-22 14:13 Confusion matrix_Curve-56e520a\PrecisionRecall\prc_stats.m
文件 2775 2012-06-22 14:13 Confusion matrix_Curve-56e520a\PrecisionRecall\prc_stats_binormal.m
文件 2179 2012-06-22 14:13 Confusion matrix_Curve-56e520a\PrecisionRecall\prc_stats_empirical.m
文件 1309 2012-06-22 14:13 Confusion matrix_Curve-56e520a\ReadMe.txt
文件 210 2012-06-22 14:13 Confusion matrix_Curve-56e520a\actual_label.mat
文件 37372 2012-06-22 14:13 Confusion matrix_Curve-56e520a\decision_values.mat
文件 1546 2012-06-22 14:13 Confusion matrix_Curve-56e520a\main.m
文件 224 2012-06-22 14:13 Confusion matrix_Curve-56e520a\name_class.mat
文件 188 2012-06-22 14:13 Confusion matrix_Curve-56e520a\num_in_class.mat
文件 437 2012-06-22 14:13 Confusion matrix_Curve-56e520a\predict_label.mat
- 上一篇:北京地铁换乘--数据结构课程设计
- 下一篇:相关滤波跟踪部分总结
评论
共有 条评论