JuliaStats / Roadmap.jl

A centralized location for planning the direction of JuliaStats
35 stars 3 forks source link

StochasticDynamics #17

Closed mschauer closed 7 years ago

mschauer commented 8 years ago

Could I get us a repository under the hood of JuliaStats to outsource some parts of my SDE package (https://github.com/mschauer/SDE.jl) into a "community friendly" package? I plan to contribute BM, Brownian bridge, Bessel processes, simulation and likelihood of multivariate Ornstein-Uhlenbeck (linear) processes and Euler-Scheme for SDEs. I think StochasticDynamics.jl or ContinuousTimeModels.jl would be a good name. Starting the package from scratch under the JuliaStats has the advantage of incorporating some more perspectives right from the start.

IainNZ commented 8 years ago

@mschauer it'd be best if you made the packages in your own account first, and invited people/advertised on mailing lists. An observation many have made is that a package being in an organization means little for meaningful contributions or maintenance. Additionally, if the new packages doesn't work out, then the cruft accumulates in the organization.

mschauer commented 8 years ago

Because I tried your approach already I really would like to try what I propose this time. The advantage is that I already have the experience of developing the package in the first time, only some changes of Julia make a big overhaul necessary and this a good chance to get others involved. By reducing the focus for the beginning to multivariate Ornstein-Uhlenbeck the task is quite managable.

papamarkou commented 8 years ago

@mschauer I have a package called Brownian.jl, which implements Brownian motion (I presume this is what you meant by BM). You may want to have a look at it if you want to unify efforts. If on the other hand you feel more comfortable working independently, this is fully understood and legitimate.

papamarkou commented 8 years ago

I forgot to mention, I also have a package (not registered yet) called RDE.jl, stands for Rough Differential Equations. It contains the Ornstein-Uhlenbeck process (and parameter estimation for it). Again, if you feel you prefer to work at your own space and pace, it is fully understood, just brought this to your attention. I use the Brownian.jl and RDE.jl code for my own research.

mschauer commented 8 years ago

@scidom Ah, thank you for taking up on this. I really want to collaborate, I mean, just comparing a code snipped from you

immutable OrnsteinUhlenbeck <: ContinuousUnivariateStochasticProcess
  λ::Float64 # drift parameter (also known as inverse relaxation time)
  σ::Float64 # diffusion parameter
  x::BrownianMotion # rough path, which is Brownian motion

  function OrnsteinUhlenbeck(λ::Float64, σ::Float64, x::BrownianMotion)
    isnan(λ) || λ > 0. || error("Parameter λ must be positive.")
    isnan(σ) || σ > 0. || error("Parameter σ must be positive.")
    new(λ, σ, x)
  end
end

from me,

type UvLinPro <: UvPro
    B::Float64
    beta::Float64
    betabyB::Float64
    Sigma::Float64
    lambda::Float64
    d::Int
    function UvLinPro(B, beta, Sigma) 
        (norm(B) > eps2) || throw(ArgumentError("norm(B) < $eps2")) 
        new(B, beta, B\beta, Sigma, -0.5*(Sigma*Sigma)/B, 1)
    end
end

shows that there is a lot of missed synergy.

papamarkou commented 8 years ago

Great, @mschauer, we can coordinate in this case. At the moment, I use my Julia code related to differential equations mostly for my research in rough paths, which means that the code is functional to meet my research needs but it is not always so well-polished. I dedicate my spare programming time in a focused way on MCMC, as my goal is to generate "production code" and make the associated Lora package mainstream.

Would you be able to take a lead on merging efforts re BM, fBM, OU processes etc? I will be able to support then by providing some feedback. If you would agree, of course feel free to copy or reorganize any of the code I have written so far in Brownian.jl and RDE.jl

mschauer commented 8 years ago

"I use my Julia code related to differential equations mostly for my research in rough paths, which means that the code is functional to meet my research needs but it is not always so well-polished"

That sounds all too familiar to me. This is also why I want to keep this very focused. Once the basic functionality and the hierarchy of types BrownianMotion{Dim} <: StochasticProcess is set up in a nice way, extensions can be contributed easily by anybody interested be it GeometricBrownianMotion, fBM or BesselProcess etc.

mschauer commented 8 years ago

Ah, and everybody: What about the name?

mschauer commented 8 years ago

@scidom I started with https://github.com/mschauer/Bridge.jl

This is how I would organize the basic types https://github.com/mschauer/Bridge.jl/blob/master/src/types.jl .

To get started, look at https://github.com/mschauer/Bridge.jl/blob/master/example/introduction.jl You will see that the framework is quite flexible and allows to extend easily by processes with different dimensions and transition behavior.

papamarkou commented 8 years ago

Hi @mschauer, quick question, what does CTPath stand for?

mschauer commented 8 years ago

Long names could be ContinousTimePath and ContinousTimeProcess

mschauer commented 8 years ago

fyi https://github.com/mschauer/Bridge.jl saw some progress since inception

mschauer commented 7 years ago

I do not think anymore that splitting my package would be a good idea.