Glog
Jump to navigation
Jump to search
Purpose
Generalized log transform.
Synopsis
- ty = glog(y,lambda) %glog
- ty = glog(y,lambda,y0) %extended glog
- y = glog(ty,lambda,[],1) %INVERSE glog
- y = glog(ty,lambda,y0,1) %INVERSE extended glog
- [ty,lambda] = glog(y,[]) %OPTIMIZE: lambda
- [ty,lambda,y0] = glog(y,[],nsd) %OPTIMIZE: lambda with extended glog
Description
Generalized log transform is a weighted log following the equation:
- ty = ln( (y-y0) + sqrt((y-y0)^2 + lambda) )
where lambda and y0 are experimentally determined constants. If the invflag input is passed as 1 (one), the function calculates the inverse transform using:
- y = 0.5 * ( 2*y0 - lambda*exp(-ty) + exp(ty) )
Inputs
- y = Matrix of data (double) to transform.
Optional Inputs
- lambda = Transform parameter. If omitted or empty, an optmization minimizing the difference between passed data is performed. The optimized lambda is returned as an output.
- y0 = Offset for use in extended log (y0 is subtracted from y before calculating the transform) if omitted, empty, or zero, no offset is used (standard glog transform).
- nsd = Passed in place of y0 ONLY when lambda is empty (indicating optimization mode). Represents the number of standard deviations of noise to use as an estimate for offset y0.
- invflag = Flag governing calculation of the forward transform (when 0, zero) or the inverse transform (when 1, one).