GithubHelp home page GithubHelp logo

adobe / chronikis Goto Github PK

View Code? Open in Web Editor NEW
22.0 6.0 3.0 9.69 MB

A compiler for Bayesian time series models.

License: Apache License 2.0

R 18.16% Stan 5.54% Shell 0.13% Haskell 76.16%
time-series-analysis bayesian-data-analysis modeling-language

chronikis's Introduction

Chronikis

Chronikis (kroh-NEE-kees) is a special-purpose language for creating time-series models. It comes with a compiler chronikisc and an R package chronikis that contains utilities for calling the compiler as well as estimating and forecasting with the compiled time-series models.

The name "Chronikis" is derived from the phrase χρονική σειρά (chronikí seirá), which means "time series" in Greek.

A PDF of the Chronikis manual, which includes installation instructions, may be found at doc/chronikis-manual.pdf.

This initial release is still missing a number of functions and distributions that the language ought to have; the focus was on implementing enough that all of the models in compiler/Acceptance could be compiled.

Contributing

Contributions are welcome! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

chronikis's People

Contributors

ksvanhorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chronikis's Issues

User-friendly version of AR1()

The current ar1() function is flexible but difficult to use. Should create a new version for the stationary ar1(). One of the parameters should be the stationary variance; the other might be either the random-walk variance or the correlation coefficient for successive time steps.

Also, documentation should give guidance on priors.

mdlArgs() with no arguments should be allowed

Expected Behaviour

mdlArgs() should return list()

Actual Behaviour

Error in names(args) <- paste0(names(args), "_") : 
  'names' attribute [1] must be the same length as the vector [0]

No constant folding done for first arg of qp()

Expected Behaviour

It should be OK to have the following in a Chronikis program:

qp(24.0 * 7.0, 0.5, 10, rho_w, sigmap_w)

Actual Behaviour

I get the following error:

chronikisc: toModelBody requires an argument in BasicModel form
CallStack (from HasCallStack):
  error, called at src/InferShapesBoundsImpl.hs:205:17 in compiler-0.2.0.0-9V7qdTqRCYd5vzfi3sufpJ:InferShapesBoundsImpl

If I run with the -x flag, I find that the call to qp() doesn't get expanded.

Need better error message for qp

Expected Behaviour

qp() currently only supports constant values for certain arguments, and should produce an error message stating this when a call to qp() has a non-constant expression for one of these arguments.

Actual Behaviour

When a non-constant value is passed for the argument period, the problem is not caught until a later stage of processing, producing the unhelpful error message "toModelBody requires an argument in BasicModel form."

Sample Code that illustrates the problem

def main(rhop: real{0.0, 1.0}, sigmap: real, period: real{0.0,})
  =
  ell = 0.7;
  mindof = 6;
  qp(period, ell, mindof, rhop, sigmap)

Need to allow constant expressions in args of qp that need constants

Expected Behaviour

The expression
qp(pyear, ell_py, 10, rho_py, sigma_py)
should properly expand if pyear and ell_py were previously defined as literals or (more generally) constant expressions.

Actual Behaviour

The expression is not expanded, causing problems in a later stage of the compiler.

Improve lifting of "data" expressions

There are instances where Chronikis-generated Stan code has subexpressions being computed in the model section that could be computed in the transformed data section. This should be fixed so that they are computed once only, in transformed data.

Allow non-literal length scale for quasiperiodicity

For the process qp(P, ell, n, rho, sigma), ell currently must be a numeric literal or a variable whose definition is a numeric literal. Extend things so that ell need not be known when you compile the model, but can be an argument passed in. That is, the compiled Stan model should allow ell to be passed in via the data section or computed in the transformed data section.

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.