gwkokab.models.sundryΒΆ

This module contains generic implementation of models that do not fit into a narrow category on intrinsic or extrinsic parameter models.

FunctionsΒΆ

NDIsotropicAndTruncatedNormalMixture(...)

General N-dimensional mixture model of an isotropic uniform distribution and a

NDTwoTruncatedNormalMixture(...)

General N-dimensional mixture model of two truncated normal distributions.

TwoTruncatedNormalMixture(...)

Create a mixture model of two truncated normal distributions.

Package ContentsΒΆ

gwkokab.models.sundry.NDIsotropicAndTruncatedNormalMixture(zeta: jaxtyping.ArrayLike, loc: jaxtyping.ArrayLike, scale: jaxtyping.ArrayLike, isotropic_low: jaxtyping.ArrayLike, isotropic_high: jaxtyping.ArrayLike, gaussian_low: jaxtyping.ArrayLike | None, gaussian_high: jaxtyping.ArrayLike | None, *, batch_dim: int = 1, validate_args: bool | None = None) numpyro.distributions.MixtureGeneral[source]ΒΆ

General N-dimensional mixture model of an isotropic uniform distribution and a truncated normal distribution.

\[p(\mathbf{x}\mid\zeta,\boldsymbol{\mu},\boldsymbol{\sigma}) = (1-\zeta)\mathcal{U}(\mathbf{x}\mid \boldsymbol{a},\boldsymbol{b}) + \zeta\mathcal{N}_{[\boldsymbol{L}, \boldsymbol{U}]}(\mathbf{x}\mid \boldsymbol{\mu},\boldsymbol{\sigma})\]

where \(\mathcal{U}(\cdot)\) is the isotropic uniform distribution between \(\boldsymbol{a}=\left< a_1, a_2, \ldots, a_N \right>\) and \(\boldsymbol{b}=\left< b_1, b_2, \ldots, b_N \right>\), and \(\mathcal{N}_{[\boldsymbol{L}, \boldsymbol{U}]}(\cdot)\) is the truncated normal distribution with mean \(\boldsymbol{\mu}=\left< \mu_1, \mu_2, \ldots, \mu_N \right>\), standard deviation \(\boldsymbol{\sigma}=\left< \sigma_1, \sigma_2, \ldots, \sigma_N \right>\), lower bound \(\boldsymbol{L}=\left< L_1, L_2, \ldots, L_N \right>\), and upper bound \(\boldsymbol{U}=\left< U_1, U_2, \ldots, U_N \right>\).

Parameters:
  • zeta (ArrayLike) – The mixing probability of the second component.

  • loc (ArrayLike) – The mean of the truncated normal distribution.

  • scale (ArrayLike) – The standard deviation of the truncated normal distribution.

  • isotropic_low (ArrayLike) – The lower bound of the isotropic uniform distribution.

  • isotropic_high (ArrayLike) – The upper bound of the isotropic uniform distribution.

  • gaussian_low (Optional[ArrayLike]) – The lower bound of the truncated normal distribution.

  • gaussian_high (Optional[ArrayLike]) – The upper bound of the truncated normal distribution.

  • batch_dim (int, optional) – The batch dimension of the distributions, by default 1

  • validate_args (Optional[bool], optional) – Whether to validate the parameters of the distributions, by default None

Returns:

N-dimensional mixture model of an isotropic uniform distribution and a truncated normal distribution.

Return type:

MixtureGeneral

gwkokab.models.sundry.NDTwoTruncatedNormalMixture(comp1_high: jaxtyping.ArrayLike, comp1_loc: jaxtyping.ArrayLike, comp1_low: jaxtyping.ArrayLike, comp1_scale: jaxtyping.ArrayLike, comp2_high: jaxtyping.ArrayLike, comp2_loc: jaxtyping.ArrayLike, comp2_low: jaxtyping.ArrayLike, comp2_scale: jaxtyping.ArrayLike, zeta: jaxtyping.ArrayLike, *, batch_dim: int = 1, validate_args: bool | None = None) numpyro.distributions.MixtureGeneral[source]ΒΆ

General N-dimensional mixture model of two truncated normal distributions.

Parameters:
  • comp1_high (ArrayLike) – The upper bound of the first truncated normal distribution.

  • comp1_loc (ArrayLike) – The mean of the first truncated normal distribution.

  • comp1_low (ArrayLike) – The lower bound of the first truncated normal distribution.

  • comp1_scale (ArrayLike) – The standard deviation of the first truncated normal distribution.

  • comp2_high (ArrayLike) – The upper bound of the second truncated normal distribution.

  • comp2_loc (ArrayLike) – The mean of the second truncated normal distribution.

  • comp2_low (ArrayLike) – The lower bound of the second truncated normal distribution.

  • comp2_scale (ArrayLike) – The standard deviation of the second truncated normal distribution.

  • zeta (ArrayLike) – The mixing proportion for the second component.

  • batch_dim (int, optional) – The batch dimension for the distributions, by default 1

  • validate_args (Optional[bool], optional) – Whether to validate the arguments, by default None

Returns:

N-dimensional mixture model of two truncated normal distributions.

Return type:

MixtureGeneral

gwkokab.models.sundry.TwoTruncatedNormalMixture(comp1_high: jaxtyping.ArrayLike | None, comp1_loc: jaxtyping.ArrayLike, comp1_low: jaxtyping.ArrayLike | None, comp1_scale: jaxtyping.ArrayLike, comp2_high: jaxtyping.ArrayLike | None, comp2_loc: jaxtyping.ArrayLike, comp2_low: jaxtyping.ArrayLike | None, comp2_scale: jaxtyping.ArrayLike, zeta: jaxtyping.ArrayLike, *, validate_args: bool | None = None) numpyro.distributions.MixtureGeneral[source]ΒΆ

Create a mixture model of two truncated normal distributions.

Parameters:
  • comp1_high (Optional[ArrayLike]) – Upper truncation for the first component.

  • comp1_loc (ArrayLike) – Location parameter for the first component.

  • comp1_low (Optional[ArrayLike]) – Lower truncation for the first component.

  • comp1_scale (ArrayLike) – Scale parameter for the first component.

  • comp2_high (Optional[ArrayLike]) – Upper truncation for the second component.

  • comp2_loc (ArrayLike) – Location parameter for the second component.

  • comp2_low (Optional[ArrayLike]) – Lower truncation for the second component.

  • comp2_scale (ArrayLike) – Scale parameter for the second component.

  • zeta (ArrayLike) – Mixing proportion for the second component.

  • validate_args (Optional[bool], optional) – Whether to validate the arguments, by default None

Returns:

A mixture of two truncated normal distributions.

Return type:

MixtureGeneral