Giter Club home page Giter Club logo

symbolic-pymc's Introduction

Symbolic PyMC

Build Status Coverage Status

Symbolic PyMC provides tools for the symbolic manipulation of PyMC models and their underlying computational graphs in Theano and TensorFlow. It enables graph manipulations in the relational DSL miniKanren—via the miniKanren package—by way of meta classes and S-expression forms of a graph.

This work stems from a series of articles starting here. Documentation and examples for Symbolic PyMC are available here.

This package is currently in alpha, so expect large-scale changes at any time!

Installation

The package name is symbolic_pymc and it can be installed with pip directly from GitHub

$ pip install git+https://github.com/pymc-devs/symbolic-pymc

or after cloning the repo (and then installing with pip).

Features

General

  • Support for Theano and TensorFlow graphs
    • Unification and reification for all components of a graph
    • A more robust Theano Op for representing random variables
    • Conversion of PyMC3 models into sample-able Theano graphs representing all random variable inter-dependencies
    • A Theano LaTeX pretty printer that displays shape information and distributions in mathematical notation
    • Simple text-based TensorFlow graph print-outs
  • Full miniKanren integration for relational graph/model manipulation.
    • Perform simple and robust "search and replace" over arbitrary graphs (e.g. Python builtin collections, AST, tensor algebra graphs, etc.)
    • Create and compose relations with explicit high-level statistical/mathematical meaning and functionality, such as "X is a normal scale mixture with mixing distribution Y", and automatically "solve" for components (i.e. X and Y) that satisfy a relation
    • Apply non-trivial conditions—as relations—to produce sophisticated graph manipulations (e.g. search for normal scale mixtures and scale a term in the mixing distribution)
    • Integrate standard Python operations into relations (e.g. use a symbolic math library to compute an inverse-Laplace transform to determine if a distribution is a scale mixture—and find its mixing distribution)
  • Convert graphs to an S-expression-like tuple-based form and perform manipulations at the syntax level
  • Pre-built example relations for graph traversal, fixed-points, symbolic closed-form posteriors, and standard statistical model reformulations

symbolic-pymc's People

Contributors

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