leaspy.models.shared_speed_logistic =================================== .. py:module:: leaspy.models.shared_speed_logistic Classes ------- .. autoapisummary:: leaspy.models.shared_speed_logistic.SharedSpeedLogisticModel Module Contents --------------- .. py:class:: SharedSpeedLogisticModel(name, **kwargs) Bases: :py:obj:`leaspy.models.logistic.LogisticInitializationMixin`, :py:obj:`leaspy.models.time_reparametrized.TimeReparametrizedModel` Logistic model for multiple variables of interest, imposing same average evolution pace for all variables (logistic curves are only time-shifted). :Parameters: **name** : :obj:`str` The name of the model. **\*\*kwargs** Hyperparameters of the model. .. !! processed by numpydoc !! .. py:method:: metric(*, g_deltas_exp) :staticmethod: Compute the metric term for the logistic model. This scaling term modulates the curvature of the logistic trajectory. :Parameters: **g_deltas_exp** : :class:`torch.Tensor` Product of slope and exp(-deltas). :Returns: :class:`torch.Tensor` Metric value, computed as: .. math:: \frac{(g \cdot e^{-\delta} + 1)^2}{g \cdot e^{-\delta}} .. !! processed by numpydoc !! .. py:method:: deltas_exp(*, deltas_padded) :staticmethod: Compute the exponential of the negative deltas. Parameters: deltas_padded (:class:`torch.Tensor`): Padded deltas. Returns: :class:`torch.Tensor`: Exponential of the negative deltas. .. !! processed by numpydoc !! .. py:method:: g_deltas_exp(*, g, deltas_exp) :staticmethod: .. py:method:: pad_deltas(*, deltas) :staticmethod: Prepend deltas with a zero as delta_1 is set to zero in the equations. . Parameters: deltas (:class:`torch.Tensor`): Deltas tensor. Returns: :class:`torch.Tensor`: Padded deltas tensor. .. !! processed by numpydoc !! .. py:method:: denom(*, g_deltas_exp) :staticmethod: Compute the denominator for the :math:`\gamma_{t_0}` calculation. .. !! processed by numpydoc !! .. py:method:: gamma_t0(*, denom) :staticmethod: Compute the :math:`\gamma_{t_0}` value, which is the inverse of the denominator. :Parameters: **denom** : :class:`torch.Tensor` Denominator term. :Returns: :class:`torch.Tensor` :math:`\gamma_{t_0}` value. .. !! processed by numpydoc !! .. py:method:: g_metric(*, gamma_t0) :staticmethod: Compute the g_metric value, which is the square of gamma_t0. :Parameters: **gamma_t0** : :class:`torch.Tensor` :math:`\gamma_{t_0}` value. :Returns: :class:`torch.Tensor` :math:`g_{metric}` value, computed as: .. math:: g\_metric = \frac{1}{(\gamma_{t0} \cdot (1 - \gamma_{t0}))^2} .. !! processed by numpydoc !! .. py:method:: collin_to_d_gamma_t0(*, deltas_exp, denom) :staticmethod: Compute the collinear term to d_gamma_t0. :Parameters: **deltas_exp** : :class:`torch.Tensor` Exponential of the negative deltas. **denom** : :class:`torch.Tensor` Denominator term. :Returns: :class:`torch.Tensor` Collinear term to d_gamma_t0 .. !! processed by numpydoc !! .. py:method:: model_with_sources(*, rt, space_shifts, metric, deltas_padded, log_g) :classmethod: Returns a model with sources. .. !! processed by numpydoc !! .. py:method:: model_no_sources(*, rt, metric, deltas_padded, log_g) :classmethod: Returns a model without sources. .. !! processed by numpydoc !! .. py:method:: get_variables_specs() Get the specifications of the variables used in the model. .. !! processed by numpydoc !!