leaspy.models.linear#
Classes#
Compute initial values for model parameters. |
|
Manifold model for multiple variables of interest (linear formulation). |
Module Contents#
- class LinearInitializationMixin#
Compute initial values for model parameters.
- class LinearModel(name, **kwargs)#
Bases:
LinearInitializationMixin,leaspy.models.riemanian_manifold.RiemanianManifoldModelManifold model for multiple variables of interest (linear formulation).
- Parameters:
name (str)
- get_variables_specs()#
Return the specifications of the variables (latent variables, derived variables, model ‘parameters’) that are part of the model.
- Returns:
NamedVariablesA dictionary-like object mapping variable names to their specifications.
- Return type:
- static metric(*, g)#
Compute the metric tensor for the model.
- Parameters:
- g
torch.Tensor Input tensor with values of the population parameter g for each feature.
- g
- Returns:
torch.TensorA tensor of ones with the same shape as g.
- Parameters:
g (Tensor)
- Return type:
- classmethod model_with_sources(*, rt, space_shifts, metric, v0, g)#
Return the model output when sources(spatial components) are present.
- Parameters:
- rt
torch.Tensor The reparametrized time.
- space_shifts
torch.Tensor The values of the space-shifts
- metricAny
The metric tensor used for computing the spatial/temporal influence.
- v0Any
The values of the population parameter v0 for each feature.
- gAny
The values of the population parameter g for each feature.
- rt
- Returns:
torch.TensorThe model output with contribution from sources.
- Parameters:
- Return type: