Skip to content

Inference on Ornstein-Uhlenbeck Process #327

Answered by bvdmitri
hstrey asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, thanks for trying out RxInfer!

The original problem in your stacktrace is due to the specification of the Normal distribution. You should use either Normal(mean = ..., precision = ...) or Normal(mean = ..., variance = ...).

Even with the correct Normal specification, this model is challenging for the typical use of RxInfer.
I tried running it on an unreleased version of the package (which will be available soon), and here is my attempt:

using ExponentialFamilyProjection
using Plots
using Statistics
using StatsPlots
using RxInfer
using Distributions
using Random
using BayesBase

function ou(A,τ,N,Δt)
    B = exp(-Δt/τ)
    x = [rand(Normal(0,sqrt(A)))]
    for i in 2:N
        push!(x,r…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@bvdmitri
Comment options

@hstrey
Comment options

@hstrey
Comment options

@bvdmitri
Comment options

Answer selected by hstrey
Comment options

You must be logged in to vote
3 replies
@hstrey
Comment options

@bvdmitri
Comment options

@hstrey
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants