# Yaps: Python Frontend to Stan

**Authors:** Guillaume Baudart, Martin Hirzel, Kiran Kate, Louis Mandel, Avraham, Shinnar

arXiv: 1812.04125 · 2018-12-12

## TL;DR

Yaps is a new Python frontend for Stan that allows users to write Stan models using Python syntax, improving usability and integration while maintaining Stan's semantics.

## Contribution

This paper introduces Yaps, a novel reinterpretation of Python syntax for Stan, enabling seamless Python-style modeling in probabilistic programming.

## Key findings

- Successfully tested on over a thousand Stan models
- Open-source implementation available for community use
- Improves user experience by integrating Python syntax with Stan semantics

## Abstract

Stan is a popular probabilistic programming language with a self-contained syntax and semantics that is close to graphical models. Unfortunately, existing embeddings of Stan in Python use multi-line strings. That approach forces users to switch between two different language styles, with no support for syntax highlighting or simple error reporting within the Stan code. This paper tackles the question of whether Stan could use Python syntax while retaining its self-contained semantics. The answer is yes, that can be accomplished by reinterpreting the Python syntax. This paper introduces Yaps, a new frontend to Stan based on reinterpreted Python. We tested Yaps on over a thousand Stan models and made it available open-source.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1812.04125/full.md

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/1812.04125/full.md

## References

19 references — full list in the complete paper: https://tomesphere.com/paper/1812.04125/full.md

---
Source: https://tomesphere.com/paper/1812.04125