Comments (3)
You can use LabelledArrays for trajectories, it is not a very natural container though, because typically time is 1-dimensional and space is n-dimensional. You can look into https://github.com/mschauer/Trajectories.jl
In any case, what ever you take, transformation between different vector based representations of trajectories is no problem at all.
from bridge.jl.
Thank you for the nice words. If you run into any obstacles, please contact me under my handle @mschauer on Julia's Discourse or Slack channels, see https://julialang.org/community/
LabelledArrays as state space are supported out of the Box:
using LabelledArrays
using ForwardDiff
using Bridge
State = @SLVector (:q, :p)
V(q) = q^2
T(p) = p^2
Hamiltonian(x) = V(x[1]) + T(x[2])
σ(t, x) = [0., 1.]
drift(t, x) = [1.0 0.0; 0.0 -1.0]*ForwardDiff.gradient(Hamiltonian, x)
x0 = State(1., 0.)
t = 0.:.001:1.0
W = sample(t, Wiener())
X = solve(Euler(), x0, W, (drift, σ))
Or do you refer to LabelledArrays
not as the state space but as representation for the trajectories? That would also not create problems in 1D simulations, for example by setting path(W) = (@SLVector (:t, :x))(W.tt, W.yy)
.
from bridge.jl.
Thanks for the detailed response.
I was thinking about the possibility of performance side effects of using LabelledArrays for the trajectories in the context of likely needing to convert (extract?) to DataFrame.
An initial use case would be Multi(variate) 1D simulations, with the single Wiener process driving each 1D simulation possibly correlated with another driving Wiener process.
Eventually, all things working out, a natural simulation would be a Multi(variate) 4D simulation, with the single Wiener process driving each 4D simulation possibly correlated with another driving Wiener process. My nomenclature is possibly misleading, but hope that makes sense?
Still surprised at the Ruby-like convenience/sytnax-sugar Julia brings.... without the performance penalties.
Your neat example of state space using LabelledArrays is interesting - I still need to internalize what is going on.
from bridge.jl.
Related Issues (17)
- Feedback and Contributing HOT 4
- Implement OU bridge
- `bi` interface HOT 1
- Initial release HOT 2
- Heads-up: replacement of SamplePath HOT 1
- Error tagging new release
- Failed to precompile Bridge HOT 2
- Implement Chambers, Mallow and Struck for $\alpha$-stable processes HOT 2
- Address t. kelmans comments HOT 2
- Tag release HOT 1
- 3DExamples a few issues with upgrade to Julia 1.2 HOT 1
- Release 0.11.* HOT 15
- Bridge.expint inappropriately returns NaN HOT 1
- expint is now in SpecialFunctions HOT 1
- TagBot trigger issue HOT 2
- SDE solver interface overhaul HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bridge.jl.