0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_boxcox::invboxcox Interface Reference

Back-transformation of Box-Cox-transformed data. More...

Public Member Functions

real(sp) function invboxcox_0d_sp (x, lmbda)
 
real(dp) function invboxcox_0d_dp (x, lmbda)
 
real(sp) function, dimension(size(x)) invboxcox_1d_sp (x, lmbda, mask)
 
real(dp) function, dimension(size(x)) invboxcox_1d_dp (x, lmbda, mask)
 

Detailed Description

Back-transformation of Box-Cox-transformed data.

Calculate the inverse Box-Cox given the transformed values and the exponent lambda.

\[ w_\text{Box-Cox}^{-1}(y) = \begin{cases} (\lambda y + 1)^{\frac{1}{\lambda}}&\text{, if }\lambda \neq 0 \\ e^{y}&\text{, if }\lambda = 0 \end{cases} \]

If an optional mask is given, then the inverse Box-Cox transformation is only performed on those locations that correspond to true values in the mask.
\(y\) can be single or double precision. The result will have the same numerical precision.
\(y\) can be scalar or vector.

Example

out = invboxcox(x, lmbda, mask=mask)

See also test folder for a detailed example, "pf_tests/test_mo_boxcox".

Parameters
[in]real(sp/dp) :: yScalar/1D-array with input numbers (`>0.`)
[in]real(sp/dp) :: lmbdaExponent power of Box-Cox transform (`>= 0.`)
[in]optional, logical :: mask1D-array of logical values with size(x). If present, only those locations in vec corresponding to the true values in mask are used. Only applicable if x is a 1D-array.
Return values
real(sp/dp) :: invboxcoxBack transformed values (at mask=.true.)
Author
Matthias Cuntz
Juliane Mai
Sebastian Müller
Date
March 2011
  • Modified MC: Python code of Travis Oliphant (2002): boxcox, llf_boxcox, get_boxcox
  • Modified MC: numerical recipes: brent, mnbrak, swap, shft
  • Modified JM: scalar version of invboxcox

Definition at line 108 of file mo_boxcox.f90.

Member Function/Subroutine Documentation

◆ invboxcox_0d_dp()

real(dp) function mo_boxcox::invboxcox::invboxcox_0d_dp ( real(dp), intent(in)  x,
real(dp), intent(in)  lmbda 
)

Definition at line 289 of file mo_boxcox.f90.

◆ invboxcox_0d_sp()

real(sp) function mo_boxcox::invboxcox::invboxcox_0d_sp ( real(sp), intent(in)  x,
real(sp), intent(in)  lmbda 
)

Definition at line 263 of file mo_boxcox.f90.

◆ invboxcox_1d_dp()

real(dp) function, dimension(size(x)) mo_boxcox::invboxcox::invboxcox_1d_dp ( real(dp), dimension(:), intent(in)  x,
real(dp), intent(in)  lmbda,
logical, dimension(:), intent(in), optional  mask 
)

Definition at line 226 of file mo_boxcox.f90.

◆ invboxcox_1d_sp()

real(sp) function, dimension(size(x)) mo_boxcox::invboxcox::invboxcox_1d_sp ( real(sp), dimension(:), intent(in)  x,
real(sp), intent(in)  lmbda,
logical, dimension(:), intent(in), optional  mask 
)

Definition at line 189 of file mo_boxcox.f90.


The documentation for this interface was generated from the following file: