Home > voicebox > prob2berk.m

prob2berk

PURPOSE ^

PROB2BERK convert probability to Berksons

SYNOPSIS ^

function [b,d]=prob2berk(p)

DESCRIPTION ^

PROB2BERK convert probability to Berksons

  Inputs:  P(M,N)       matrix containing probability values

 Outputs:  P(M,N)       Corresponding Berkson values
           D(M,N)       Corresponding derivatives dP/dB

 Berksons, or log-odds, are a nonlinear scale for measuring
 probability defined by B = log2(P./(1-P)).
 When Berksons are used to measure probability, a logistic
 psychometric function becomes linear.

 The inverse function is berk2prob()

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [b,d]=prob2berk(p)
0002 %PROB2BERK convert probability to Berksons
0003 %
0004 %  Inputs:  P(M,N)       matrix containing probability values
0005 %
0006 % Outputs:  P(M,N)       Corresponding Berkson values
0007 %           D(M,N)       Corresponding derivatives dP/dB
0008 %
0009 % Berksons, or log-odds, are a nonlinear scale for measuring
0010 % probability defined by B = log2(P./(1-P)).
0011 % When Berksons are used to measure probability, a logistic
0012 % psychometric function becomes linear.
0013 %
0014 % The inverse function is berk2prob()
0015 
0016 %      Copyright (C) Mike Brookes 2014
0017 %      Version: $Id: prob2berk.m 4501 2014-04-24 06:28:21Z dmb $
0018 %
0019 %   VOICEBOX is a MATLAB toolbox for speech processing.
0020 %   Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
0021 %
0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 %   This program is free software; you can redistribute it and/or modify
0024 %   it under the terms of the GNU General Public License as published by
0025 %   the Free Software Foundation; either version 2 of the License, or
0026 %   (at your option) any later version.
0027 %
0028 %   This program is distributed in the hope that it will be useful,
0029 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0030 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0031 %   GNU General Public License for more details.
0032 %
0033 %   You can obtain a copy of the GNU General Public License from
0034 %   http://www.gnu.org/copyleft/gpl.html or by writing to
0035 %   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
0036 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0037 b=log2(p./(1-p));
0038 if nargout>1
0039     d=log(2)*p.*(1-p);
0040 end

Generated on Tue 10-Oct-2017 08:30:10 by m2html © 2003