foehnix.foehnix.Control

class foehnix.foehnix.Control(family, switch, left=-inf, right=inf, truncated=False, standardize=True, maxit=100, tol=1e-08, force_inflate=False, verbose=True)[source]

Foehnix Two-Component Mixture-Model Control Object

Can be passed to the Foehnix class or will be initialized

__init__(family, switch, left=-inf, right=inf, truncated=False, standardize=True, maxit=100, tol=1e-08, force_inflate=False, verbose=True)[source]

Initialization of the Control object

Parameters:
family : str or foehnix.Family

specifying the distribution of the components in the mixture model.

switch : bool

whether or not the two components should be switched.

  • False (default): the component which shows higher values within the predictor is assumed to be the foehn cluster.
  • True: lower values are assumed to be the foehn cluster.
left : float

left censoring or truncation point. Default -Inf

right : float

right censoring or truncation point. Default Inf

truncated : bool

If True truncation is used instead of censoring. This only affects the model if left and/or right are specified.

standardize : bool

Defines whether or not the model matrix for the concomitant model should be standardized for model estimation. Recommended.

maxit : int or [int, int]

Maximum number of iterations for the iterative solvers. Default is 100. If a vector of length 2 is provided the first value is used for the EM algorithm, the second for the IWLS backfitting.

tol : float or [float, float]

Tolerance defining when convergence of the iterative solvers is reached. Default is 1e-8. If a vector of length 2 is provided the first value is used for the EM algorithm, the second for the IWLS backfitting.

force_inflate : bool

foehnix.Foehnix will create a strictly regular time series by inflating the data to the smallest time intervall in the data set. If the inflation rate is larger than 2 the model will stop except the user forces inflation by specifying force_inflate = True. This can cause a serious runtime increase. Default is False.

verbose : bool or str

Sets the verbose level of the model logging

  • True (default): Information on most tasks will be provided
  • False: Only critical errors and warnings will be provided
  • ‘DEBUG’: More detailed information will be provided

Methods

__init__(family, switch[, left, right, …]) Initialization of the Control object