MapPaths
MapPaths(n_paths=None)
Bases: PathEnsemble
Deterministic paths of a moving cloud of nodes.
The nodes start at cells of the first snapshot. On every interval the node cloud is
pushed by the reference dynamics, then moved toward the next snapshot by
:meth:step.
Parameters:
-
n_paths(int or None, default:None) –Number of paths, with start cells drawn without replacement in the first snapshot. If
None, all its cells.
Attributes:
-
paths_(torch.Tensor of shape (n_paths, nsnaps, ndim)) –Node positions of every path.
moments(n_paths=None, generator=None)
First two moments of the path nodes.
Empirical moments of :meth:sample (normalized by the number of paths).
Ensembles fitted on exact laws override this with the exact moments.
Parameters:
-
n_paths(int or None, default:None) –Number of paths passed to :meth:
sample. -
generator(Generator or None, default:None) –Optional RNG for reproducible sampling.
Returns:
-
means(torch.Tensor of shape (nsnaps, ndim)) –Mean of the nodes at every snapshot time.
-
covs(torch.Tensor of shape (nsnaps, nsnaps, ndim, ndim)) –covs[j, k]is the covariance between the nodes at timesjandk.
step(src, tgt, k)
abstractmethod
Move the pushed node cloud toward the next snapshot.
Parameters:
-
src(torch.Tensor of shape (n_paths, ndim)) –Node cloud pushed to
t_{k+1}. -
tgt(torch.Tensor of shape (n_tgt, ndim)) –Cells of snapshot k + 1.
-
k(int) –Interval index.
Returns:
-
torch.Tensor of shape (n_paths, ndim)–New node positions at
t_{k+1}.