Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Comparing various backwards schemes #44

Merged
merged 65 commits into from
Jan 27, 2020
Merged

WIP: Comparing various backwards schemes #44

merged 65 commits into from
Jan 27, 2020

Conversation

mschauer
Copy link
Owner

@mschauer mschauer commented May 1, 2019

@mschauer
Copy link
Owner Author

mschauer commented May 1, 2019

Compute numbers for likelihoods in the model

struct IntegratedDiffusion <: ContinuousTimeProcess{ℝ{2}}
    γ::Float64
end

βu(t, x::Float64, P::IntegratedDiffusion) = - (x+sin(x)) + 1/2
Bridge.b(t::Float64, x, P::IntegratedDiffusion) = ℝ{2}(x[2], βu(t, x[2], P))
Bridge.σ(t, x, P::IntegratedDiffusion) = ℝ{2}(0.0, P.γ)

Bridge.constdiff(::IntegratedDiffusion) = true

struct IntegratedDiffusionAux <: ContinuousTimeProcess{ℝ{2}}
    γ::Float64
end

βu(t, x::Float64, P::IntegratedDiffusionAux) = -x + 1/2
Bridge.b(t::Float64, x, P::IntegratedDiffusionAux) = ℝ{2}(x[2], βu(t, x[2], P))

with parameters

T = 1.5
dt = 1/1000

tt = 0.:dt:T

x0 = ℝ{2}(2.0, 1.0)

L = @SMatrix [1. 0.]
Σ = @SMatrix [0.1]
v = ℝ{1}(2.5)

γ = 0.7

ϵ = 0.00001

which we can compare the FitzHughNagumo code against: e.g

LP = log(pdf(Normal((μt[1])[1] + (Lt[1] * x0)[1], (Mt[1])[1] ^ -0.5), v[1])) 
 -0.9929361410325926

@mschauer
Copy link
Owner Author

mschauer commented May 2, 2019

Gradient descent towards maximum likelihood of the start value:
https://www.dropbox.com/s/2olgz3jg8mqk2nz/gradientdescent.mp4?dl=0

The gradient of the momenta seems to be very low.

@mschauer mschauer merged commit 620e7fa into master Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants