@@ -212,22 +212,23 @@ In the previous examples, we built the sampler by manually specifying the integr
212
212
Moreover, there's some flexibility in how these samplers can be initialized.
213
213
For example, a user can initialize a NUTS (HMC and HMCDA) sampler with their own metrics and integrators.
214
214
This can be done as follows:
215
- ``` julia
216
- nuts = NUTS (δ, metric = :diagonal ) # metric = DiagEuclideanMetric(D) (Default!)
217
- nuts = NUTS (δ, metric = :unit ) # metric = UnitEuclideanMetric(D)
218
- nuts = NUTS (δ, metric = :dense ) # metric = DenseEuclideanMetric(D)
219
- # Provide your own AbstractMetric
220
- metric = DiagEuclideanMetric (10 )
221
- nuts = NUTS (δ, metric = metric)
222
-
223
- nuts = NUTS (δ, integrator = :leapfrog ) # integrator = Leapfrog(ϵ) (Default!)
224
- nuts = NUTS (δ, integrator = :jitteredleapfrog ) # integrator = JitteredLeapfrog(ϵ, 0.1ϵ)
225
- nuts = NUTS (δ, integrator = :temperedleapfrog ) # integrator = TemperedLeapfrog(ϵ, 1.0)
226
-
227
- # Provide your own AbstractIntegrator
228
- integrator = JitteredLeapfrog (0.1 , 0.2 )
229
- nuts = NUTS (δ, integrator = integrator)
230
- ```
215
+
216
+ ``` julia
217
+ nuts = NUTS (δ, metric = :diagonal ) # metric = DiagEuclideanMetric(D) (Default!)
218
+ nuts = NUTS (δ, metric = :unit ) # metric = UnitEuclideanMetric(D)
219
+ nuts = NUTS (δ, metric = :dense ) # metric = DenseEuclideanMetric(D)
220
+ # Provide your own AbstractMetric
221
+ metric = DiagEuclideanMetric (10 )
222
+ nuts = NUTS (δ, metric = metric)
223
+
224
+ nuts = NUTS (δ, integrator = :leapfrog ) # integrator = Leapfrog(ϵ) (Default!)
225
+ nuts = NUTS (δ, integrator = :jitteredleapfrog ) # integrator = JitteredLeapfrog(ϵ, 0.1ϵ)
226
+ nuts = NUTS (δ, integrator = :temperedleapfrog ) # integrator = TemperedLeapfrog(ϵ, 1.0)
227
+
228
+ # Provide your own AbstractIntegrator
229
+ integrator = JitteredLeapfrog (0.1 , 0.2 )
230
+ nuts = NUTS (δ, integrator = integrator)
231
+ ```
231
232
232
233
### GPU Sampling with CUDA
233
234
0 commit comments