popsynth.aux_samplers.plaw_aux_sampler module

class popsynth.aux_samplers.plaw_aux_sampler.ParetoAuxSampler(name: str, observed: bool = True)[source]

Bases: AuxiliarySampler

xmin
alpha
sigma
__init__(name: str, observed: bool = True)[source]

A pareto distribution sampler, where property ~ 1 / x^(alpha + 1).

Parameters
  • name (str) – Name of the property

  • observed (bool) – True if the property is observed, False if it is latent. Defaults to True

  • xmin (AuxiliaryParameter) – Minimum value of the pareto

  • alpha (AuxiliaryParameter) – Index of the pareto

  • sigma (AuxiliaryParameter) – Standard deviation of normal distribution from which observed values are sampled, if observed is True

true_sampler(size: int)[source]
observation_sampler(size: int)[source]
class popsynth.aux_samplers.plaw_aux_sampler.PowerLawAuxSampler(name: str, observed: bool = True)[source]

Bases: AuxiliarySampler

xmin
xmax
alpha
sigma
__init__(name: str, observed: bool = True)[source]

A bounded power law distribution sampler, where property ~ x^``alpha``.

Parameters
  • name (str) – Name of the property

  • observed (bool) – True if the property is observed, False if it is latent. Defaults to True

  • xmin (AuxiliaryParameter) – Minimum value of the power law

  • xmax (:class:``AuxiliaryParameter) – Maximum value of the power law

  • sigma (AuxiliaryParameter) – Standard deviation of normal distribution from which observed values are sampled, if observed is True

true_sampler(size: int)[source]
observation_sampler(size: int)[source]
class popsynth.aux_samplers.plaw_aux_sampler.BrokenPowerLawAuxSampler(name: str, observed: bool = True)[source]

Bases: AuxiliarySampler

xmin
alpha
xbreak
beta
xmax
__init__(name: str, observed: bool = True)[source]

A broken power law distribution sampler, where property ~ x^``alpha`` for x < xbreak, and property ~ x^``beta`` for x > xbreak.

Parameters
  • name (str) – Name of the property

  • observed (bool) – True if the property is observed, False if it is latent. Defaults to True

  • xmin (AuxiliaryParameter) – Minimum value of the broken power law

  • xmax (:class:``AuxiliaryParameter) – Maximum value of the broken power law

  • sigma (AuxiliaryParameter) – Standard deviation of normal distribution from which observed values are sampled, if observed is True

true_sampler(size: int)[source]
observation_sampler(size: int)[source]