{"id":28946257,"url":"https://github.com/pymc-devs/symbolic-pymc","last_synced_at":"2025-08-24T21:26:00.085Z","repository":{"id":66066687,"uuid":"171037735","full_name":"pymc-devs/symbolic-pymc","owner":"pymc-devs","description":"Tools for the symbolic manipulation of PyMC models, Theano, and TensorFlow graphs.","archived":false,"fork":false,"pushed_at":"2024-03-20T15:48:21.000Z","size":3971,"stargazers_count":62,"open_issues_count":20,"forks_count":8,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-08-05T13:38:48.574Z","etag":null,"topics":["bayesian","minikanren","probabilistic-programming","pymc","relational-programming","symbolic-computation","symbolic-math","tensorflow","theano"],"latest_commit_sha":null,"homepage":"https://pymc-devs.github.io/symbolic-pymc","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pymc-devs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"numfocus","custom":["https://numfocus.org/donate-to-pymc"]}},"created_at":"2019-02-16T18:35:05.000Z","updated_at":"2025-02-19T17:08:09.000Z","dependencies_parsed_at":"2024-04-09T20:21:35.960Z","dependency_job_id":"3aaf3b54-544e-4cd0-9c5d-504a5073a2a4","html_url":"https://github.com/pymc-devs/symbolic-pymc","commit_stats":{"total_commits":184,"total_committers":3,"mean_commits":"61.333333333333336","dds":0.04347826086956519,"last_synced_commit":"84e8d612c714f502f8d188c1766498f4ff7beecf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pymc-devs/symbolic-pymc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymc-devs%2Fsymbolic-pymc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymc-devs%2Fsymbolic-pymc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymc-devs%2Fsymbolic-pymc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymc-devs%2Fsymbolic-pymc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pymc-devs","download_url":"https://codeload.github.com/pymc-devs/symbolic-pymc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymc-devs%2Fsymbolic-pymc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271953146,"owners_count":24849291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian","minikanren","probabilistic-programming","pymc","relational-programming","symbolic-computation","symbolic-math","tensorflow","theano"],"created_at":"2025-06-23T08:05:27.184Z","updated_at":"2025-08-24T21:26:00.077Z","avatar_url":"https://github.com/pymc-devs.png","language":"Python","funding_links":["https://github.com/sponsors/numfocus","https://numfocus.org/donate-to-pymc"],"categories":["Python"],"sub_categories":[],"readme":"# Symbolic PyMC\n\n[![Build Status](https://travis-ci.org/pymc-devs/symbolic-pymc.svg?branch=master)](https://travis-ci.org/pymc-devs/symbolic-pymc) [![Coverage Status](https://coveralls.io/repos/github/pymc-devs/symbolic-pymc/badge.svg?branch=master)](https://coveralls.io/github/pymc-devs/symbolic-pymc?branch=master)\n\n\n[Symbolic PyMC](https://pymc-devs.github.io/symbolic-pymc) provides tools for the symbolic manipulation of [PyMC](https://github.com/pymc-devs) models and their underlying computational graphs in [Theano](https://github.com/Theano/Theano) and [TensorFlow](https://github.com/tensorflow/tensorflow).  It enables graph manipulations in the relational DSL [miniKanren](http://minikanren.org/)\u0026mdash;via the [`miniKanren`](https://github.com/pythological/kanren) package\u0026mdash;by way of meta classes and S-expression forms of a graph.\n\nThis work stems from a series of articles starting [here](https://brandonwillard.github.io/a-role-for-symbolic-computation-in-the-general-estimation-of-statistical-models.html).  Documentation and examples for Symbolic PyMC are available [here](https://pymc-devs.github.io/symbolic-pymc).\n\n*This package is currently in alpha, so expect large-scale changes at any time!*\n\n## Installation\n\nThe package name is `symbolic_pymc` and it can be installed with `pip` directly from GitHub\n```shell\n$ pip install git+https://github.com/pymc-devs/symbolic-pymc\n```\nor after cloning the repo (and then installing with `pip`).\n\n## Features\n\n### General\n\n* Support for [Theano](https://github.com/Theano/Theano) and [TensorFlow](https://github.com/tensorflow/tensorflow) graphs\n  - [Unification and reification](https://github.com/pythological/unification) for all components of a graph\n  - A more robust Theano `Op` for representing random variables\n  - Conversion of PyMC3 models into sample-able Theano graphs representing all random variable inter-dependencies\n  - A Theano LaTeX pretty printer that displays shape information and distributions in mathematical notation\n  - Simple text-based TensorFlow graph print-outs\n* Full [miniKanren](http://minikanren.org/) integration for relational graph/model manipulation.\n  - Perform simple and robust \"search and replace\" over arbitrary graphs (e.g. Python builtin collections, AST, tensor algebra graphs, etc.)\n  - 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\n  - Apply non-trivial conditions\u0026mdash;as relations\u0026mdash;to produce sophisticated graph manipulations (e.g. search for normal scale mixtures and scale a term in the mixing distribution)\n  - 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\u0026mdash;and find its mixing distribution)\n* Convert graphs to an S-expression-like tuple-based form and perform manipulations at the syntax level\n* Pre-built example relations for graph traversal, fixed-points, symbolic closed-form posteriors, and standard statistical model reformulations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymc-devs%2Fsymbolic-pymc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpymc-devs%2Fsymbolic-pymc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymc-devs%2Fsymbolic-pymc/lists"}