Home > SuperSegger > segmentation > scoreNeuralNet.m

scoreNeuralNet

PURPOSE ^

scoreNeuralNet : calculates the scores of regions/ segments using a trained neural network

SYNOPSIS ^

function [rawScore] = scoreNeuralNet (x,net)

DESCRIPTION ^

 scoreNeuralNet : calculates the scores of regions/ segments using a trained neural network 
 Neural network was already trained using a trained Pattern Recognition Problem 

 INPUT : 
   x : input to the network, quantities regarding the segment or region. 
   net : neural network with parameters optimized for different 
 cells and imaging conditions

 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/>.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Thu 19-Jan-2017 13:55:21 by m2html © 2005