changeset 27:f9fceb869865

update to range of depthThresh permitted
author DaveM
date Sun, 12 Mar 2017 19:56:52 +0000
parents 3e9de361fc58
children 7710e44f432a
files phase2/treeLinkFeatures.m
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/phase2/treeLinkFeatures.m	Wed Mar 08 18:08:51 2017 +0000
+++ b/phase2/treeLinkFeatures.m	Sun Mar 12 19:56:52 2017 +0000
@@ -12,6 +12,11 @@
 if(nargin < 2)
     depthThresh = 999;
 end
+
+if (len(depthThresh) == 1)
+    depthThresh = 1:depthThresh;
+end
+    
 linkList = aglomCluster(data);
 linkList = depthCheck(linkList);
 listSize = size(data,1);
@@ -25,7 +30,7 @@
     if(currentRow(1) > listSize)
         row = currentRow(1) - listSize;
 %         rD = linkList(row,4);
-        if(linkList(row,4) < depthThresh)
+        if any(linkList(row,4)==depthThresh)
             classList = traceLinkageToBinary(linkList, row);
             featureList{row,1} = rfFeatureSelection(data(classList>0,:), classList(classList>0));
             featureList{row,2} = linkList(row,4);