GithubHelp home page GithubHelp logo

gpavanb1 / nodefit.jl Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 158 KB

Fit Time-Series Data to Neural Differential Equations in Julia

License: MIT License

Julia 100.00%
differential-equations julia neural-networks stochastic-differential-equations time-series

nodefit.jl's Introduction

NODEFit.jl

Fit time-series data with a Neural Differential Equation in Julia!

This repository contains time-series data fit capabilities using both Neural Ordinary Differential Equations and Neural Stochastic Differential Equations

Also checkout its Python version

How to install and execute?

Just instantiate the package and you can run the examples

julia fit_nsde.jl

The following program illustrates a basic example

using NODEFit
using Lux: Chain, Dense

#######
# Define the networks
#######
# Network dimensions
ndim, nhid = 2, 4
drift_net = Chain(x -> x .^ 3, Dense(ndim, nhid, tanh), Dense(nhid, ndim))
diff_net = Dense(ndim, ndim)

#######
# Define the data
#######
tsteps = collect(Float32, range(0.0f0, 1.0f0; length=30))
sde_data, sde_data_vars = # Matrices of time-series data and variances

#######
# Fit the data
#######
result_nsde = NODEFit.fit_nsde(drift_net, diff_net, tsteps, sde_data, sde_data_vars)

Full examples are provided in the examples folder

Sample Output

Sample Output

Why use Julia?

Once compiled, Julia is much faster than Python and the following article provides comparison for the underlying routines

Neural SDE fits for 500 iterations were performed on Early 2015 MacBook Pro in real-time (as seen in output) compared to ~10 seconds per iteration in NODEFit

Whom to contact?

Please direct your queries to gpavanb1 for any questions.

Acknowledgements

This package would not be possible without the supporting packages. The assistance provided in Julia Slack groups is also gratefully acknowledged. Documentation of DiffEqFlux.jl served as guidance for some of the routines.

nodefit.jl's People

Contributors

gpavanb1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.