Closed acubed3 closed 2 years ago
Hi, thanks for the note.
Is it Wiener process with zero mean and unit volatility?
That's loosely true up to the fact that W(t) may be multidimensional.
What is exactly
batch_size
?
You may interpret this as the number of particles that's being simulated which evolves as according to the SDE.
What is exactly brownian_size?
This is the dimension of the Brownian motion (it is not necessarily the size of the state). In most classic texts, the state dimension is denoted by d
, and the dimension of the Brownian motion is denoted by m
.
but if we set size=1, we see TypeError: int object is no iterable
We made it clear in the documentation that the input should be a tuple of int, as opposed to a single integer. If you set size=(1,)
, it should work, since (1,)
is a tuple of one integer 1
.
@lxuechen , thank you so much for your reply!
I will test all the point about tuple of int and will comment it later. The clarification about batch_size
is almost clear.
What about my question how to add the Wiener process with volatility != 1
to each equation of a set of coupled SDEs? Is the presented definition of g
(it is given in my first comment) true or not?
Note g
should return a matrix of size (batch_size, state_size, brownian_size)
when the noise_type
is general
. Again, batch_size
is the number of particles (note one particle can be multi-dimensional). state_size
is the dimension of each particle, and brownian_size
is the size of the Brownian motion. Mathematically, during simulation, a matmul is performed behind for this g
term, e.g., with Euler solver, you get X_{t+dt} = X_t + f(X_t, t) dt + matmul(g(Xt, t), W{t + dt} - W_t).
Indirectly, this gives you a way to control for the volatility.
Closing the issue for now. Free feel to reopen/followup if further clarification is needed.
I have a set of coupled SDE with white noise. I would like to solve it using
torchsde
but I completely do not understand what is exactlyW(t)
from documentation.Is it Wiener process with zero mean and unit volatility? How can I add Wiener process with
sigma != 1
into each equation of my set?Our naive guess was:
where
2*A
is the volatility of Wiener process.However, it seems that it does not work.
Next, consider the object
BrownianInterval
. We have a hope that this can help. We initialize:and next try to solve SDE by using
sdeint
.What is exactly
batch_size
? What is exactlybrownian_size
? Forbrownian_size
I can not find any definition or any other documentation.Finally, from documentation:
but if we set
size=1
, we seeTypeError: int object is no iterable
Could you please clarify these points?