@@ -87,6 +87,9 @@ pub struct NutsSettings<A: Debug + Copy + Default> {
87
87
/// The maximum tree depth during sampling. The number of leapfrog steps
88
88
/// is smaller than 2 ^ maxdepth.
89
89
pub maxdepth : u64 ,
90
+ /// The minimum tree depth during sampling. The number of leapfrog steps
91
+ /// is larger than 2 ^ mindepth.
92
+ pub mindepth : u64 ,
90
93
/// Store the gradient in the SampleStats
91
94
pub store_gradient : bool ,
92
95
/// Store each unconstrained parameter vector in the sampler stats
@@ -114,6 +117,7 @@ impl Default for DiagGradNutsSettings {
114
117
num_tune : 400 ,
115
118
num_draws : 1000 ,
116
119
maxdepth : 10 ,
120
+ mindepth : 0 ,
117
121
max_energy_error : 1000f64 ,
118
122
store_gradient : false ,
119
123
store_unconstrained : false ,
@@ -132,6 +136,7 @@ impl Default for LowRankNutsSettings {
132
136
num_tune : 800 ,
133
137
num_draws : 1000 ,
134
138
maxdepth : 10 ,
139
+ mindepth : 0 ,
135
140
max_energy_error : 1000f64 ,
136
141
store_gradient : false ,
137
142
store_unconstrained : false ,
@@ -152,6 +157,7 @@ impl Default for TransformedNutsSettings {
152
157
num_tune : 1500 ,
153
158
num_draws : 1000 ,
154
159
maxdepth : 10 ,
160
+ mindepth : 0 ,
155
161
max_energy_error : 20f64 ,
156
162
store_gradient : false ,
157
163
store_unconstrained : false ,
@@ -187,6 +193,7 @@ impl Settings for LowRankNutsSettings {
187
193
188
194
let options = NutsOptions {
189
195
maxdepth : self . maxdepth ,
196
+ mindepth : self . mindepth ,
190
197
store_gradient : self . store_gradient ,
191
198
store_divergences : self . store_divergences ,
192
199
store_unconstrained : self . store_unconstrained ,
@@ -246,6 +253,7 @@ impl Settings for DiagGradNutsSettings {
246
253
247
254
let options = NutsOptions {
248
255
maxdepth : self . maxdepth ,
256
+ mindepth : self . mindepth ,
249
257
store_gradient : self . store_gradient ,
250
258
store_divergences : self . store_divergences ,
251
259
store_unconstrained : self . store_unconstrained ,
@@ -302,6 +310,7 @@ impl Settings for TransformedNutsSettings {
302
310
303
311
let options = NutsOptions {
304
312
maxdepth : self . maxdepth ,
313
+ mindepth : self . mindepth ,
305
314
store_gradient : self . store_gradient ,
306
315
store_divergences : self . store_divergences ,
307
316
store_unconstrained : self . store_unconstrained ,
0 commit comments