Skip to content
프로젝트

소개

확률 프로그래밍을 이용한 베이지안 추론.

AI 및 머신러닝

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+3
in 15 days
+2
in 1 month
+1

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Turing.jl logo

Bayesian inference with probabilistic programming

Tutorials API docs Tests Code Coverage ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

Turing.jl is a general-purpose probabilistic programming package for Bayesian and likelihood-based inference. Implemented in Julia, it is designed to interoperate with the language's scientific computing ecosystem. Models can be written with @model, in BUGS syntax via JuliaBUGS.jl, or graphically with DoodlePPL, and support MCMC, variational inference, maximum likelihood and MAP estimation, and customised inference through Turing's log-density and gradient interface.

Turing's preferred automatic differentiation backends for gradient-based algorithms are ForwardDiff.jl and Mooncake.jl. Other backends, such as Enzyme.jl, are available through DifferentiationInterface.jl.

Get started

Install Julia 1.10.8 or later from the official Julia website. Then open a Julia REPL and run:

julia> using Pkg; Pkg.add("Turing")

The following example places priors on an intercept, slope, and residual scale, then samples the posterior distribution of these parameters:

julia> using Random, Turing

julia> rng = Xoshiro(1)

julia> @model function linear_regression(x)
           # Priors
           α ~ Normal(0, 1)
           β ~ Normal(0, 1)
           σ ~ truncated(Cauchy(0, 3); lower=0)

           # Likelihood
           μ = α .+ β .* x
           y ~ MvNormal(μ, σ^2 * I)
       end

julia> x = range(-1, 1; length=20)

julia> y = 1 .+ 2 .* x .+ 0.2 .* randn(rng, length(x))

julia> posterior = linear_regression(x) | (; y = y)

julia> chain = sample(rng, posterior, NUTS(), 1000)

The example generates synthetic observations, conditions the model on them with | (; y = y), and draws 1,000 posterior samples of α, β, and σ using the No-U-Turn sampler.

Documentation and discussion

See the TuringLang tutorials, Turing.jl API reference, and TuringLang newsletter. Changes are recorded in HISTORY.md; published releases are available on the GitHub releases page.

For technical discussion, use the #turing channel on Julia Slack (request an invitation) or the turing tag on Julia Discourse.

Project scope

Turing is grant-funded research software that prioritises correctness and stability over broad feature coverage. New features are often developed through research projects or collaborations. Reproducible reports of incorrect results or unexpected failures in documented functionality guide further work.

Contributing

Discuss proposed features in an issue before implementation. Focused bug fixes and small changes may be submitted directly as pull requests. Maintainers can transfer bug reports filed in the wrong TuringLang repository.

Pull requests for non-breaking changes target main; breaking changes target breaking. Reviewer privileges are reserved for sustained, substantive contributors and people invited by a team member. If an issue or pull request has received no response, ping @TuringLang/maintainers.

Citing Turing.jl

If you use Turing.jl in published work, please cite:

Turing.jl: A General-Purpose Probabilistic Programming Language
Tor Erlend Fjelde, Kai Xu, David Widmann, Mohamed Tarek, Cameron Pfiffer, Martin Trapp, Seth D. Axen, Xianda Sun, Markus Hauru, Penelope Yong, Will Tebbutt, Zoubin Ghahramani, Hong Ge
ACM Transactions on Probabilistic Machine Learning, 1(3):1–48, 2025.

Turing: A Language for Flexible Probabilistic Inference
Hong Ge, Kai Xu, Zoubin Ghahramani
Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics, PMLR 84:1682–1690, 2018.

Expand for BibTeX
@article{10.1145/3711897,
  author = {Fjelde, Tor Erlend and Xu, Kai and Widmann, David and Tarek, Mohamed and Pfiffer, Cameron and Trapp, Martin and Axen, Seth D. and Sun, Xianda and Hauru, Markus and Yong, Penelope and Tebbutt, Will and Ghahramani, Zoubin and Ge, Hong},
  title = {Turing.jl: A General-Purpose Probabilistic Programming Language},
  journal = {ACM Trans. Probab. Mach. Learn.},
  year = {2025},
  volume = {1},
  number = {3},
  pages = {1--48},
  month = aug,
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  doi = {10.1145/3711897},
  url = {https://doi.org/10.1145/3711897},
}

@inproceedings{pmlr-v84-ge18b,
  author = {Ge, Hong and Xu, Kai and Ghahramani, Zoubin},
  title = {Turing: A Language for Flexible Probabilistic Inference},
  booktitle = {Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics},
  editor = {Storkey, Amos and Perez-Cruz, Fernando},
  series = {Proceedings of Machine Learning Research},
  volume = {84},
  pages = {1682--1690},
  year = {2018},
  month = {09--11 Apr},
  publisher = {PMLR},
  pdf = {http://proceedings.mlr.press/v84/ge18b/ge18b.pdf},
  url = {https://proceedings.mlr.press/v84/ge18b.html},
}

관련 프로젝트 살펴보기

불러오는 중…