资源简介
内含训练样本,分类数据和一整套matlab代码,可直接运行,作者是参考
Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines文章自行编写的,效果良好。
代码片段和文件信息
function [overall_accuracykappa_accuracyaverage_accuracyclass_accuracyerrorMatrix] = calcError( trueLabelling segLabelling labels )
% calculates square array of numbers organized in rows and columns which express the
% percentage of pixels assigned to a particular category (in segLabelling) relative
% to the actual category as indicated by reference data (trueLabelling)
% errorMatrix(ij) = nr of pixels that are of class i-1 and were
% classified as class j-1
% accuracy is essentially a measure of how many ground truth pixels were classified
% correctly (in percentage).
% average accuracy is the average of the accuracies for each class
% overall accuracy is the accuracy of each class weighted by the proportion
% of test samples for that class in the total training set
[nrX nrY] = size(trueLabelling);
totNrPixels = nrX*nrY;
nrPixelsPerClass = zeros(1length(labels))‘;
nrClasses = length(labels);
errorMatrix = zeros(length(labels)length(labels));
errorMatrixPerc = zeros(length(labels)length(labels));
for l_true=1:length(labels)
tmp_true = find (trueLabelling == (l_true-1));
nrPixelsPerClass(l_true) = length(tmp_true);
for l_seg=1:length(labels)
tmp_seg = find (segLabelling == (l_seg-1));
nrPixels = length(intersect(tmp_truetmp_seg));
errorMatrix(l_truel_seg) = nrPixels;
end
end
% classWeight = nrPixelsPerClass/totNrPixels;
diagVector = diag(errorMatrix);
class_accuracy = (diagVector./(nrPixelsPerClass));
average_accuracy = mean(class_accuracy);
overall_accuracy = sum(segLabelling == trueLabelling)/length(trueLabelling);
kappa_accuracy = (sum(errorMatrix(:))*sum(diag(errorMatrix)) - sum(errorMatrix)*sum(errorMatrix2))...
/(sum(errorMatrix(:))^2 - sum(errorMatrix)*sum(errorMatrix2));
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1773 2014-01-09 10:37 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\calcError.m
文件 688 2014-01-09 10:37 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\confusion.m
文件 3320 2017-11-12 20:44 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\demosuperpixel_classification_predict.m
文件 1454 2013-12-24 15:19 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\elmpredict.m
文件 1752 2013-12-24 15:19 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\elmtrain.m
文件 5586 2014-05-08 10:15 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\entropylabels400.mat
文件 907 2017-11-12 20:40 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\generatemstd.m
文件 1649296 2013-12-11 09:49 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\indian_pines_corrected.mat
文件 1125 2014-01-09 11:04 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\Indian_pines_gt.mat
文件 34806917 2014-05-04 13:27 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\PaviaU.mat
文件 11005 2014-05-04 13:05 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\PaviaU_gt.mat
文件 59714 2014-05-24 23:14 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\pu1200.mat
文件 444 2014-01-09 10:37 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\scale_func.m
文件 103 2014-01-09 10:37 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\ToMatrix.m
文件 131 2014-01-09 10:37 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC\ToVector.m
目录 0 2017-11-12 20:43 Spectral-Spatial Hyperspectral Image Classification Using Superpixel and Extreme Learning Machines-SRC
----------- --------- ---------- ----- ----
36544215 16
评论
共有 条评论