treeScore : calculates the scores of regions/ segments using given classification tree. INPUT : x : input to the network, quantities regarding the segment or region. treeClassifier : treeClassifier object. OUTPUT : score : rawScore from -50 to 50. Above 0 is a good segment/region. Copyright (C) 2016 Wiggins Lab Written by Stella Stylianidou. University of Washington, 2016 This file is part of SuperSegger. SuperSegger is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SuperSegger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SuperSegger. If not, see <http://www.gnu.org/licenses/>.
0001 function [rawScore] = treeScore (x,treeClassifier) 0002 % treeScore : calculates the scores of regions/ segments using given classification tree. 0003 % 0004 % INPUT : 0005 % x : input to the network, quantities regarding the segment or region. 0006 % treeClassifier : treeClassifier object. 0007 % 0008 % OUTPUT : 0009 % score : rawScore from -50 to 50. Above 0 is a good segment/region. 0010 % 0011 % Copyright (C) 2016 Wiggins Lab 0012 % Written by Stella Stylianidou. 0013 % University of Washington, 2016 0014 % This file is part of SuperSegger. 0015 % 0016 % SuperSegger is free software: you can redistribute it and/or modify 0017 % it under the terms of the GNU General Public License as published by 0018 % the Free Software Foundation, either version 3 of the License, or 0019 % (at your option) any later version. 0020 % 0021 % SuperSegger is distributed in the hope that it will be useful, 0022 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0023 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0024 % GNU General Public License for more details. 0025 % 0026 % You should have received a copy of the GNU General Public License 0027 % along with SuperSegger. If not, see <http://www.gnu.org/licenses/>. 0028 0029 [~,prob_per_class] = treeClassifier.predict(x); 0030 prob = prob_per_class (:,2)'; 0031 0032 % because of the way scores were calculated in the past I will shift the 0033 % rawScore by .5 and multiply by 100 to make them spread out! 0034 rawScore = (prob - 0.5) * 100; 0035 0036 end 0037