leaspy.models.logistic¶
Classes¶
Manifold model for multiple variables of interest (logistic formulation). |
Module Contents¶
- class LogisticModel(name, **kwargs)[source]¶
Bases:
LogisticInitializationMixin,leaspy.models.riemanian_manifold.RiemanianManifoldModelManifold model for multiple variables of interest (logistic formulation).
- Parameters:
name (str)
- 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.
- Return type:
- static metric(*, g)[source]¶
Compute the metric tensor from input tensor g. This function calculates the metric as ((g + 1)^2 / g) element-wise.
- Parameters:
- gt
torch.Tensor Input tensor with values of the population parameter g for each feature.
- gt
- Returns:
torch.TensorThe computed metric tensor, same shape as g(number of features)
- Parameters:
g (Tensor)
- Return type:
- classmethod model_with_sources(*, rt, space_shifts, metric, v0, g)[source]¶
Return the model output when sources(spatial components) are present.
- Parameters:
- rtTensorOrWeightedTensor[float]
Tensor containing the reparametrized time.
- space_shiftsTensorOrWeightedTensor[float]
Tensor containing the values of the space-shifts
- metricTensorOrWeightedTensor[float]
Tensor containing the metric tensor used for computing the spatial/temporal influence.
- v0TensorOrWeightedTensor[float]
Tensor containing the values of the population parameter v0 for each feature.
- gTensorOrWeightedTensor[float]
Tensor containing the values of the population parameter g for each feature.
- Returns:
torch.TensorWeighted value tensor after applying sigmoid transformation, representing the model output with sources.
- Parameters:
rt (TensorOrWeightedTensor[float])
space_shifts (TensorOrWeightedTensor[float])
metric (TensorOrWeightedTensor[float])
v0 (TensorOrWeightedTensor[float])
- Return type: