Existing Warp Functions

There are several pre-defined warp functions implementing some common maps.

class vanguard.warps.warpfunctions.AffineWarpFunction(a=1, b=0)[source]

A warp of form \(y \mapsto ay + b\).

Parameters:
__init__(a=1, b=0)[source]

Initialise self.

Parameters:
  • a (Union[float, int]) – The scale of the affine transformation.

  • b (Union[float, int]) – The shift of the affine transformation.

property a: Parameter

Return the weight.

property b: Parameter

Return the bias.

class vanguard.warps.warpfunctions.PositiveAffineWarpFunction(a=1, b=0)[source]

A warp of form \(y \mapsto ay + b\), where \(ay + b > 0\).

Note

This warp function needs to be activated before use. See vanguard.warps.intermediate.

Parameters:
__init__(a=1, b=0)[source]

Initialise self.

Parameters:
  • a (Union[float, int]) – The prior for the weight of the function.

  • b (Union[float, int]) – The prior for the bias of the function.

class vanguard.warps.warpfunctions.BoxCoxWarpFunction(lambda_=0)[source]

The Box-Cox warp as in [Rios19].

The transformation is given by:

\[y\mapsto\frac{sgn(y)|y|^\lambda - 1}{\lambda}, \lambda\in\mathbb{R}_0^+.\]
Parameters:

lambda_ (Union[int, float])

__init__(lambda_=0)[source]

Initialise self.

Parameters:
  • lambda – The parameter for the transformation.

  • lambda_ (Union[int, float])

class vanguard.warps.warpfunctions.SinhWarpFunction[source]

A map of the form \(y\mapsto\sinh(y)\).

class vanguard.warps.warpfunctions.ArcSinhWarpFunction[source]

A map of the form \(y\mapsto\sinh^{-1}(y)\).

class vanguard.warps.warpfunctions.LogitWarpFunction[source]

A map of the form \(y\mapsto\log\frac{y}{1-y}\).

class vanguard.warps.warpfunctions.SoftPlusWarpFunction[source]

A map of the form \(y\mapsto\log(e^y - 1)\).