Mercurial > hg > sfx-subgrouping
changeset 11:29304e7bfead
develop treeLinkFeatures so it searched valid lines and stops at leaf nodes
author | DaveM |
---|---|
date | Fri, 10 Feb 2017 12:18:20 +0000 |
parents | 686d1f9b8698 |
children | d0bd98e7b6c9 |
files | phase2/treeLinkFeatures.m |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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);