leaspy.models.riemanian_manifold¶
Classes¶
Manifold model for multiple variables of interest (logistic or linear formulation). |
Module Contents¶
- class RiemanianManifoldModel(name, variables_to_track=None, **kwargs)[source]¶
Bases:
leaspy.models.time_reparametrized.TimeReparametrizedModelManifold model for multiple variables of interest (logistic or linear formulation).
- Parameters:
- name
str The name of the model.
- **kwargs
Hyperparameters of the model (including noise_model)
- name
- Raises:
LeaspyModelInputErrorIf hyperparameters are inconsistent
- Parameters:
name (str)
variables_to_track (Optional[Iterable[VariableName]])
- classmethod compute_sufficient_statistics(state)[source]¶
Compute the model’s sufficient statistics.
- get_variables_specs()[source]¶
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. These include ModelParameter, Hyperparameter, PopulationLatentVariable, and LinkedVariable instances.
- Return type:
- classmethod model_no_sources(*, rt, metric, v0, g)[source]¶
Return the model output when sources(spatial components) are not present.
- Parameters:
- rt
torch.Tensor The reparametrized time.
- 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 without contribution from source shifts.
- Parameters:
rt (Tensor)
- Return type:
Notes
This implementation delegates to model_with_sources with space_shifts set to a zero tensor of shape (1, 1), effectively removing source effects.