@@ -8,33 +8,96 @@ description: |
88 Turing.jl is a probabilistic programming language and Bayesian modelling framework for the Julia programming language.
99---
1010
11- <div class =" d-flex flex-column align-items-center gap-0 " style =" padding :7rem 0 ;" >
12- <image src =" assets/images/turing-logo.svg " width =" 150px " alt =" Three normal probability distributions " >
13- <span style =" font-size :4rem ;font-weight :700 ;" >Turing.jl</span >
14- <span style =" font-size :2rem ;padding-bottom :1.25rem ;" >Bayesian inference with probabilistic programming</span >
15- <div class =" d-flex flex-row gap-2 " >
16- [ Get Started] ( https://turinglang.org/docs/tutorials/docs-00-getting-started/ ) {.button--fill .btn}
17-
18- <!-- The empty line above makes quarto accept the div class -->
19- [ API reference] ( /library/ ) {.button .btn}
20- </div >
21- </div >
22- <div class =" d-flex flex-row flex-wrap justify-content-center gap-3 pb-5 " >
23- <div class =" card " >
24- <div class =" card-title " >Intuitive</div >
25- Turing models are easy to write and communicate — syntax is close to mathematical notations.
11+ ``` {=html}
12+ <div class="content-panel">
13+ <div class="d-flex flex-column align-items-center gap-0" style="padding:6rem 0;">
14+ <image src="assets/images/turing-logo.svg" width="150px" alt="Three normal probability distributions">
15+ <span style="font-size:4rem;font-weight:700;">
16+ Turing.jl
17+ </span>
18+ <span class="display-6 d-block text-center pb-4 display-md-5 display-lg-4">
19+ Bayesian inference with probabilistic programming
20+ </span>
21+ <div class="d-flex flex-row flex-wrap justify-content-center gap-2">
22+ <a href="https://turinglang.org/docs/tutorials/docs-00-getting-started/" class="button--fill btn">
23+ Tutorials
24+ </a>
25+ <a href="/library" class="button btn">
26+ Ecosystem
27+ </a>
28+ <a href="https://github.com/TuringLang" class="button btn">
29+ View on GitHub
30+ </a>
31+ </div>
2632 </div>
27-
28- <div class =" card " >
29- <div class =" card-title " >General-purpose</div >
30- Turing supports models with discrete parameters and stochastic control flow.
33+ <div class="d-flex flex-row flex-wrap justify-content-center gap-3" style="padding-bottom:6rem;">
34+ <div class="card">
35+ <div class="card-title">
36+ Intuitive
37+ </div>
38+ Turing models are easy to write and communicate — syntax is close to mathematical notations.
39+ </div>
40+ <div class="card">
41+ <div class="card-title">
42+ General-purpose
43+ </div>
44+ Turing supports models with discrete parameters and stochastic control flow.
45+ </div>
46+ <div class="card">
47+ <div class="card-title">
48+ Modular & composable
49+ </div>
50+ Turing is modular, written entirely in Julia, and is interoperable with the powerful Julia ecosystem.
51+ </div>
3152 </div>
32-
33- <div class =" card " >
34- <div class =" card-title " >Modular & composable</div >
35- Turing is modular, written entirely in Julia, and is interoperable with the powerful Julia ecosystem.
53+ </div>
54+ ```
55+ <div class =" content-panel " >
56+ <div class =" d-flex flex-row flex-wrap justify-content-center gap-3 " >
57+ <div style =" min-width :420px ; max-width :420px ;text-align :right ;padding :0.5rem ;" >
58+ <div style =" font-size :x-large ;font-weight :700 ;padding-bottom :0.5rem ;" >
59+ Hello, World in Turing
3660 </div >
61+ Some text about how easy it is to [ get going] ( https://turinglang.org/docs/tutorials/00-introduction/ ) .
62+ </div >
63+ <div style =" min-width :500px ;" >
64+ ``` julia
65+ @model function coinflip (; N:: Int )
66+ # Prior belief about the probability of heads
67+ p ~ Beta (1 , 1 )
68+
69+ # Heads or tails of a coin are drawn from `N`
70+ # Bernoulli distributions with success rate `p`
71+ y ~ filldist (Bernoulli (p), N)
72+
73+ return y
74+ end ;
75+ ```
76+ </div >
3777</div >
78+ <div class =" d-flex flex-row flex-wrap justify-content-center gap-3 " >
79+ <div style =" min-width :500px ;" >
80+ ``` julia
81+ @model function putting_model (d, n; jitter= 1e-4 )
82+ v ~ Gamma (2 , 1 )
83+ l ~ Gamma (4 , 1 )
84+ f = GP (v * with_lengthscale (SEKernel (), l))
85+ f_latent ~ f (d, jitter)
86+ binomials = Binomial .(n, logistic .(f_latent))
87+ y ~ product_distribution (binomials)
88+ return (fx= f (d, jitter), f_latent= f_latent, y= y)
89+ end
90+ ```
91+ </div >
92+ <div style =" min-width :420px ; max-width :420px ;padding :0.5rem ;" >
93+ <div style =" font-size :x-large ;font-weight :700 ;padding-bottom :0.5rem ;" >
94+ Goodbye, World in Turing
95+ </div >
96+ Some text about how easy it is to interface with external packages like AbstractGPs. Learn more about modelling [ Gaussian Processes] ( https://turinglang.org/docs/tutorials/15-gaussian-processes/ ) with Turing.jl.
97+ </div >
98+ </div >
99+ </div >
100+
38101
39102<!--
40103::: {.hero-banner}
0 commit comments