probcomp / iventure

An interactive, browser-based probabilistic programming environment.
Apache License 2.0
14 stars 2 forks source link

Interactive Environment For Probabilistic Programming for Probabilistic Data Analysis

Build Status

About

iventure serves as a jupyter-based front-end for BayesDB.

Installing

For access to iventure, please refer to the release webpage of the Probabilistic Computing Stack.

Tutorial Notebooks

Please refer to the following tutorial notebooks for illustrative probabilistic data analysis tasks on real-world datasets:

Magics Usage

The magics.py contains cell magics which allow for interactive probabilistic programming in a Jupyter notebook.

In the first cell of a Jupyter notebook, load the extension.

%load_ext iventure.magics

Open a bdb file

%bayesdb foo.bdb

Write MML programs

%mml CREATE POPULATION ...

or, for multi-line schemas.

%%mml
DROP POPULATION xyz;
CREATE POPULATION xyz for t (...);

Write BQL programs

%bql ESTIMATE MUTUAL INFORMATION OF x WITH y WITHIN xyz;

or, for multi-line queries

%%bql
CREATE TEMP TABLE depprobs AS
    ESTIMATE DEPENDENCE PROBABILITY FROM PARIWSE VARIABLES OF xyz;
.plot SELECT * FROM depprobs

Use dot commands for BQL shorthands

%bql .nullify satellites_t NaN
%bql .population satellites_p

Use dot commands with BQL for plotting

%bql .scatter SELECT apogee_km, perigee_km FROM satellites_t LIMIT 100;