|
a |
|
b/classification/bagging/graphBags.m |
|
|
1 |
function graphBags( bags, leafs, figureName ) |
|
|
2 |
%GRAPHBAGS Summary of this function goes here |
|
|
3 |
% Detailed explanation goes here |
|
|
4 |
|
|
|
5 |
|
|
|
6 |
labels = num2cell(leafs); |
|
|
7 |
labels = cellfun(@num2str,labels,'UniformOutput',0); |
|
|
8 |
|
|
|
9 |
col = 'rgbcmy'; |
|
|
10 |
figure('name',figureName); |
|
|
11 |
|
|
|
12 |
for i=1:size(bags,2) |
|
|
13 |
plot(oobError(bags{i}),col(i)); |
|
|
14 |
hold on; |
|
|
15 |
end |
|
|
16 |
|
|
|
17 |
xlabel('number of grown trees'); |
|
|
18 |
ylabel('out-of-bag classification error'); |
|
|
19 |
legend(labels,'Location','NorthEast'); |
|
|
20 |
hold off; |
|
|
21 |
|
|
|
22 |
end |
|
|
23 |
|