All Projects → pyro-ppl → Brmp

pyro-ppl / Brmp

Licence: apache-2.0
Bayesian Regression Models in Pyro

Projects that are alternatives of or similar to Brmp

Cvpr18 detect globally refine locally
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Parsing Pdfs
Extracting tabular information from PDFs using python
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Bdmi 2020a
Big Data and Machine Intelligence, Autumn 2020.
Stars: ✭ 39 (+2.63%)
Mutual labels:  jupyter-notebook
Bottom Up Attention
Bottom-up attention model for image captioning and VQA, based on Faster R-CNN and Visual Genome
Stars: ✭ 989 (+2502.63%)
Mutual labels:  jupyter-notebook
Visual Attention Model
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Optimal Transport
Optimal transport and generalizations
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Deeplearningwithpython
Machine Learning and Data Science study group starting Sep'2018
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Exkmc
Expanding Explainable K-Means Clustering
Stars: ✭ 39 (+2.63%)
Mutual labels:  jupyter-notebook
Vietnamese Accent Model
A simple deep learning model to add accent to Vietnamese text.
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Stylegan2 Ada Google Colab Starter Notebook
A colab notebook for training Stylegan2-ada on colab, transfer learning onto your own dataset.
Stars: ✭ 39 (+2.63%)
Mutual labels:  jupyter-notebook
True artificial intelligence
真AI人工智能
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Stock Market Prediction Using Natural Language Processing
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Mmm Py
Marshall MRMS Mosaic Python Toolkit
Stars: ✭ 37 (-2.63%)
Mutual labels:  jupyter-notebook
Adventures In Ml Code
This repository holds all the code for the site http://www.adventuresinmachinelearning.com
Stars: ✭ 989 (+2502.63%)
Mutual labels:  jupyter-notebook
Dpcn
The official code implementation of "Deep Phase Correlation for End-to-End Heterogeneous Sensor Measurements Matching", CoRL2020.
Stars: ✭ 39 (+2.63%)
Mutual labels:  jupyter-notebook
Vespcn Tensorflow
Tensorflow implementation of VESPCN
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Flexx Notebooks
Jupyter notebooks with Flexx examples.
Stars: ✭ 38 (+0%)
Mutual labels:  jupyter-notebook
Hyperbolic zsl
Hyperbolic Visual Embedding Learning for Zero-Shot Recognition (CVPR 2020)
Stars: ✭ 39 (+2.63%)
Mutual labels:  jupyter-notebook
Coursera Natural Language Processing Specialization
Programming assignments from all courses in the Coursera Natural Language Processing Specialization offered by deeplearning.ai.
Stars: ✭ 39 (+2.63%)
Mutual labels:  jupyter-notebook
Pithermalcam
The PiThermalCam Project connects an MLX90640 Thermal IR Camera to a Raspberry Pi for viewing or web streaming.
Stars: ✭ 39 (+2.63%)
Mutual labels:  jupyter-notebook

Bayesian Regression Models

This is an attempt to implement a brms-like library in Python.

It allows Bayesian regression models to be specified using (a subset of) the lme4 syntax. Given such a description and a pandas data frame, the library generates model code and design matrices, targeting either Pyro or NumPyro.

Resources

Current Status

Model Specification

Formula

Here are some example formulae that the system can handle:

Formula Description
y ~ x Population-level effects
y ~ 1 + x
y ~ x1:x2 Interaction between variables
y ~ 1 + x0 + (x1 | z) Group-level effects
y ~ 1 + x0 + (1 + x1 | z)
y ~ 1 + x0 + (1 + x1 || z) No correlation between group coefficients
y ~ 1 + x0 + (1 + x1 | z1:z2) Grouping by multiple factors (untested)
y ~ 1 + x0 + (x1 | z0) + (1 + x2 || z1) Combinations of the above

Priors

Custom priors can be specified at various levels of granularity. For example, users can specify:

  • A prior to be used for every population-level coefficient.
  • A prior to be used for a particular population-level coefficient. (The system is aware of the coding used for categorical columns/factors in the data frame, which allows priors to be assigned to the coefficient corresponding to a particular level of a factor.)
  • A prior to be used for all columns of the standard deviation vector in every group.
  • A prior to be used for all columns of the standard deviation vector in a particular group.
  • A prior to be used for a particular coefficient of the standard deviation vector in a particular group.
  • etc.

Users can give multiple such specifications and they combine in a sensible way.

Response Families

The library supports models with either (uni-variate) Gaussian or Binomial (inc. Bernoulli) distributed responses.

Inference

The Pyro back end supports both NUTS and SVI for inference. The NumPyro backend supports only NUTS.

The library includes the following functions for working with posteriors:

  • marginals(...): This produces a model summary similar to that obtained by doing fit <- brm(...) ; fit$fit in brms.
  • fitted(...): This implements some of the functionality available in brms through the fitted and predict methods.

Limitations

  • All formula terms must be column names. Expressions such as sin(x1) or I(x1*x2) are not supported.
  • The * operator is not supported. (Though the model y ~ 1 + x1*x2 can be specified with the formula y ~ 1 + x1 + x2 + x1:x2.)
  • The / operator is not supported. (Though the model y ~ ... | g1/g2 can be specified with the formula y ~ (... | g1) + (... | g1:g2).)
  • The syntax for removing columns is not supported. e.g. y ~ x - 1
  • The response is always uni-variate.
  • Parameters of the response distribution cannot take their values from the data. e.g. The number of trials parameter of Binomial can only be set to a constant, and cannot vary across rows of the data.
  • Only a limited number of response families are supported. In particular, Categorical responses (beyond the binary case) are not supported.
  • Some priors used in the generated code don't match those generated by brms. e.g. There's no Half Student-t distribution, setting prior parameters based on the data isn't supported.
  • The centering data transform, performed by brms to improve sampling efficiency, is not implemented.
  • This doesn't include any of the fancy stuff brms does, such as its extensions to the lme4 grouping syntax, splines, monotonic effects, GP terms, etc.
  • The fitted function does not implement all of the functionality of its analogue in brms.
  • There are no tools to help with MCMC diagnostics, posterior checks, hypothesis testing, etc.
  • Lots more, probably...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].