models_theory
This class contains a recopilatory of diffusion models used in ANDI. The class is organized in three subclasses, each corresponding to a different dimensionality of the output trajectory.
Currently the library containts the following models:
Function | Dimensions | Description |
---|---|---|
bm | (1D) | Brownian motion |
fbm | (1D/2D/3D) | Fractional browian motion, simulated via the stochastic Python library |
ctrw | (1D/2D/3D) | Continuous time random walks |
lw | (1D/2D/3D) | Levy walks |
attm | (1D/2D/3D) | Annealed transit time |
sbm | (1D/2D/3D) | Scaled brownian motion |
The class is organized as follows:
For every model in the previous list, there exists a function
models_theory.name_walk
which generates diffusion following that model. All functions have the same inputs and outputs:Inputs
T
(int
): lenght of the trajectory. Gets transformed to int if input is float.alpha
(float
): anomalous exponentD
({1,2,3}
): dimension of the walk.
Outputs
numpy.array
of lenghtD
xT
.
This is the recommended way of generating trajectories.
For every dimension, there exists a subclass
models_theory._dimensionD
, which gives access to the walk generators in each dimensions. Every walk is a function of these subclasses. This allows to access more features of the diffusion models:ctrw
regular_time
(bool
): if true, regularizes the trajectory so that every element in the output corresponds to a time step. If false, returns the positions and times at which steps were done.
attm
:regime
({1,2,3}
): allows to chose the regime of ATTM model. See the original paper Phys. Rev. Lett. 112, 150603 (2014) for further details.
sbm
:sigma
(float
): variance of the noise generator (similar to a local diffusion coefficient).
To learn more on the use of this class, please visit this tutorial.