leaspy.models.logistic ====================== .. py:module:: leaspy.models.logistic Classes ------- .. autoapisummary:: leaspy.models.logistic.LogisticInitializationMixin leaspy.models.logistic.LogisticModel Module Contents --------------- .. py:class:: LogisticInitializationMixin .. py:class:: LogisticModel(name, **kwargs) Bases: :py:obj:`LogisticInitializationMixin`, :py:obj:`leaspy.models.riemanian_manifold.RiemanianManifoldModel` Manifold model for multiple variables of interest (logistic formulation). .. !! processed by numpydoc !! .. py:method:: get_variables_specs() Return the specifications of the variables (latent variables, derived variables, model 'parameters') that are part of the model. :Returns: NamedVariables A dictionary-like object mapping variable names to their specifications. .. !! processed by numpydoc !! .. py:method:: metric(*, g) :staticmethod: Compute the metric tensor from input tensor `g`. This function calculates the metric as \((g + 1)^2 / g\) element-wise. :Parameters: **g** : t :class:`torch.Tensor` Input tensor with values of the population parameter `g` for each feature. :Returns: :class:`torch.Tensor` The computed metric tensor, same shape as g(number of features) .. !! processed by numpydoc !! .. py:method:: model_with_sources(*, rt, space_shifts, metric, v0, g) :classmethod: Return the model output when sources(spatial components) are present. :Parameters: **rt** : TensorOrWeightedTensor[float] Tensor containing the reparametrized time. **space_shifts** : TensorOrWeightedTensor[float] Tensor containing the values of the space-shifts **metric** : TensorOrWeightedTensor[float] Tensor containing the metric tensor used for computing the spatial/temporal influence. **v0** : TensorOrWeightedTensor[float] Tensor containing the values of the population parameter `v0` for each feature. **g** : TensorOrWeightedTensor[float] Tensor containing the values of the population parameter `g` for each feature. :Returns: :class:`torch.Tensor` Weighted value tensor after applying sigmoid transformation, representing the model output with sources. .. !! processed by numpydoc !!