leaspy.models.linear ==================== .. py:module:: leaspy.models.linear Classes ------- .. autoapisummary:: leaspy.models.linear.LinearInitializationMixin leaspy.models.linear.LinearModel Module Contents --------------- .. py:class:: LinearInitializationMixin Compute initial values for model parameters. .. !! processed by numpydoc !! .. py:class:: LinearModel(name, **kwargs) Bases: :py:obj:`LinearInitializationMixin`, :py:obj:`leaspy.models.riemanian_manifold.RiemanianManifoldModel` Manifold model for multiple variables of interest (linear 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: :class:`~leaspy.variables.specs.NamedVariables A dictionary-like object mapping variable names to their specifications. .. !! processed by numpydoc !! .. py:method:: metric(*, g) :staticmethod: Compute the metric tensor for the model. :Parameters: **g** : :class:`torch.Tensor` Input tensor with values of the population parameter `g` for each feature. :Returns: :class:`torch.Tensor` A tensor of ones with the same shape as `g`. .. !! 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** : :class:`torch.Tensor` The reparametrized time. **space_shifts** : :class:`torch.Tensor` The values of the space-shifts **metric** : Any The metric tensor used for computing the spatial/temporal influence. **v0** : Any The values of the population parameter `v0` for each feature. **g** : Any The values of the population parameter `g` for each feature. :Returns: :class:`torch.Tensor` The model output with contribution from sources. .. !! processed by numpydoc !!