Skip to content

A probabilistic approach from an Improbabilistic company

License

Notifications You must be signed in to change notification settings

rs992214/keanu

 
 

Repository files navigation

    __ __                      
   / //_/__  ____ _____  __  __
  / ,< / _ \/ __ `/ __ \/ / / /
 / /| /  __/ /_/ / / / / /_/ / 
/_/ |_\___/\__,_/_/ /_/\__,_/  

Build Status Quality Gate Maven Central Javadocs Slack

Overview

Keanu is a general purpose probabilistic programming library built in Java and developed by Improbable's research team. It enables you to build Bayesian networks through which you can make probabilistic predictions about large, complex and multifaceted problems.

This is an early stage, pre-alpha version of Keanu. We have an ambitious team attempting to build an even more ambitious product with the help of the open source community.

Contributing Guidelines

We have decided to open source Keanu at such an early stage in order to solicit user feedback and help guide the product to success.

Whilst we will always welcome contributions, we would value your time more if it were spent applying Keanu to challenging problems and locating its strengths and weaknesses.

Please create a Github Issue if you encounter any bugs or have a feature request.

Features

  • Probabilistic Programming Operators and Distributions
  • Auto-differentiation
  • Inference
    • Maximum a posteriori
    • Metropolis Hastings
    • Hamiltonian Monte Carlo
    • Sequential Monte Carlo (Particle Filtering)
  • Support for Kotlin

Getting Started

Want to see an example and run it yourself? Head over to Getting Started.

Documentation

Want to learn more? Head over to the Documentation. You can also see our JavaDocs or our Python Docs

Future

What does the future entail for Keanu? Find out at Future.

Examples

Interested in more technical examples? Explore the examples repo at /keanu-examples.

Development

Building the code

We use Gradle, so running ./gradlew build (or gradlew.bat build on Windows) will compile all the code and run all the tests. You can also run the JMH performance benchmarks with ./gradlew runAllBenchmarks.

Annotations

We use Lombok annotations, which you will need to enable in your IDE.

For IntelliJ:

  • Install the Lombok plugin
  • Settings > Build, Execution, Deployment > Compiler > Annotation Processors - Enable annotation processing

Formatting

We use Spotless and yapf to automatically enforce some basic code style checks. If your build fails due to a formatting issue, simply run ./gradlew formatApply and commit the changes. You need to have run ./gradlew build or test at least once before running formatApply, as this installs yapf in your virtual environment.

Python Code Generation

Custom annotations are used for python code generation. It depends on Oracle JDK to build (i.e. does not support open source JDKs). The minimum version requirement is Python 3.6. Simply run ./gradlew codeGen to generate the code and commit the changes.

Hiring

Interested in working for Improbable on cool problems? Start here

About

A probabilistic approach from an Improbabilistic company

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 86.5%
  • Python 12.0%
  • Kotlin 1.1%
  • Shell 0.3%
  • FreeMarker 0.1%
  • Dockerfile 0.0%