Code Monkey home page Code Monkey logo

cmdstan-clj's Introduction

cmdstan-clj

cmdstan-clj is a Clojure wrapper of Stan probabilistic programming language that uses the CmdStan CLI.

Clojars Project

If you wish to help in testing and extending this library, we would be glad to chat. It can be a nice opportunity to practice Bayesian Statistics, even if you are not experienced with it yet.

Status

Currently, this is an evolving proof-of-concept, still a bit fragile with respect to edge cases and setup.

Usage

You will need CmdStan installed in your system, and the environment variable STAN_HOME pointing to its location.

Them you can follow the walkthrough.

Why

Stan is a programming language for Bayesian statistical modelling with wonderful community and ecosystem.

Clojure has a few actively developed probabilistic programming options such as Inferme and Gen.clj. Still, at some use casese, Stan is more efficient and certainly has a more complete ecosystem around it. While the pure-Clojure options keep evolving, it would be good to have Stan as well in our toolset. It may also help us in benchmarking and testing the other options.

One way to interoperate with Stan is through the command line CmdStan. It is a common way, used in other languages. Ideally, it should allow choosing a version of CmdStan, as well as compiling it for using the GPU.

clj-stan is great, but only supports an old version of CmdStan.

In the current project, we explore the current version of CmdStan. Possibly, when the details clarify, we may propose merging the new implementation into the existing clj-stan.

Limitations

At the moment, cmdstan-clj's API does not offer a way to keep track of CmdStan's output while it is running through the sampling process. For long-running processes, this is of course important.

Implementation details

Currently, cmdstan-clj runs CmdStan through the makefile as advised by the manual. In the future, we may consider a more direct apporach as clj-stan seems to do. At the moment, the practical difference are not clear to us.

License

Copyright © 2024 Scicloj

EPLv1.0 is just the default for projects generated by clj-new: you are not required to open source this project, nor are you required to use EPLv1.0! Feel free to remove or change the LICENSE file and remove or update this section of the README.md file!

Distributed under the Eclipse Public License version 1.0.

cmdstan-clj's People

Contributors

daslu avatar

Stargazers

Daniel Neal avatar Ulan Sametov avatar  avatar Daniel Szmulewicz avatar David Pham avatar  avatar

Watchers

 avatar  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.