# HG changeset patch # User DaveM # Date 1486729100 0 # Node ID 29304e7bfeadf1b245ef533898c26a31e139bfc8 # Parent 686d1f9b86986c09f5ab57c920a62ce51c42d36b develop treeLinkFeatures so it searched valid lines and stops at leaf nodes diff -r 686d1f9b8698 -r 29304e7bfead phase2/treeLinkFeatures.m --- a/phase2/treeLinkFeatures.m Fri Feb 10 12:04:23 2017 +0000 +++ b/phase2/treeLinkFeatures.m Fri Feb 10 12:18:20 2017 +0000 @@ -1,4 +1,4 @@ -function featureList = treeLinkFeatures(data) +function [linkList, featureList]= treeLinkFeatures(data) %% linkList = treeLinkFeatures(data) % given a dataset, a hierarchical cluster of the data is produced, and then % the data is traversed, such that, for each split in the data, a set of @@ -15,11 +15,10 @@ while (length(currentRow) > 0) - currentRow - if(currentRow(1) > listSize-1) - row = currentRow(1) - listSize; + if(currentRow(1) >= listSize) + row = currentRow(1) - listSize classList = traceLinkageToBinary(linkList, row); - featureList{row} = rfFeatureSelection(data(classList>0,:), classList(classList>0)) + featureList{row} = rfFeatureSelection(data(classList>0,:), classList(classList>0)); currentRow = [currentRow(2:end); linkList(row,1); linkList(row,2)]; else currentRow = currentRow(2:end);