-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassifySumbul.m
46 lines (33 loc) · 1.43 KB
/
classifySumbul.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% This trains a supervised classifier, and tries to see how well we
% perform
clear all, close all
featureList = { 'biStratificationDistance', ...
'densityOfBranchPoints ' ...
'stratificationDepth', ...
'totalDendriticLength' };
r = RGCclass(0);
r.lazyLoad('Sumbul');
r.allFeatureNames = { 'biStratificationDistance', ...
'branchAssymetry', ...
'dendriticDensity', ...
'dendriticDiameter', ...
'dendriticField', ...
'densityOfBranchPoints', ...
'fractalDimensionBoxCounting', ...
'meanBranchAngle', ...
'meanSegmentLength', ...
'meanSegmentTortuosity', ...
'meanTerminalSegmentLength', ...
'numBranchPoints', ...
'stratificationDepth', ...
'totalDendriticLength' };
sumbulIdx = r.getRGCSubset('sumbul');
knownIdx = find(r.RGCtypeID > 0);
useIdx = intersect(sumbulIdx,knownIdx);
r.RGC = r.RGC(useIdx);
r.updateTables(featureList); % Also sets featureMatrix
r.dataSetName = 'KnownSumbul';
r.lazySave('knownSumbul');
[corrFraction,corrFractionSD,correctFraction, ...
classifiedID,correctFlag, mu, sigma, dataIdx] = r.benchmark(10);
fprintf('correct fraction %.1f %% +/- %.1f %%\n', 100*corrFraction, 100*corrFractionSD)