@@ -87,6 +87,9 @@ pub struct NutsSettings<A: Debug + Copy + Default> {
8787 /// The maximum tree depth during sampling. The number of leapfrog steps
8888 /// is smaller than 2 ^ maxdepth.
8989 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 ,
9093 /// Store the gradient in the SampleStats
9194 pub store_gradient : bool ,
9295 /// Store each unconstrained parameter vector in the sampler stats
@@ -114,6 +117,7 @@ impl Default for DiagGradNutsSettings {
114117 num_tune : 400 ,
115118 num_draws : 1000 ,
116119 maxdepth : 10 ,
120+ mindepth : 0 ,
117121 max_energy_error : 1000f64 ,
118122 store_gradient : false ,
119123 store_unconstrained : false ,
@@ -132,6 +136,7 @@ impl Default for LowRankNutsSettings {
132136 num_tune : 800 ,
133137 num_draws : 1000 ,
134138 maxdepth : 10 ,
139+ mindepth : 0 ,
135140 max_energy_error : 1000f64 ,
136141 store_gradient : false ,
137142 store_unconstrained : false ,
@@ -152,6 +157,7 @@ impl Default for TransformedNutsSettings {
152157 num_tune : 1500 ,
153158 num_draws : 1000 ,
154159 maxdepth : 10 ,
160+ mindepth : 0 ,
155161 max_energy_error : 20f64 ,
156162 store_gradient : false ,
157163 store_unconstrained : false ,
@@ -187,6 +193,7 @@ impl Settings for LowRankNutsSettings {
187193
188194 let options = NutsOptions {
189195 maxdepth : self . maxdepth ,
196+ mindepth : self . mindepth ,
190197 store_gradient : self . store_gradient ,
191198 store_divergences : self . store_divergences ,
192199 store_unconstrained : self . store_unconstrained ,
@@ -246,6 +253,7 @@ impl Settings for DiagGradNutsSettings {
246253
247254 let options = NutsOptions {
248255 maxdepth : self . maxdepth ,
256+ mindepth : self . mindepth ,
249257 store_gradient : self . store_gradient ,
250258 store_divergences : self . store_divergences ,
251259 store_unconstrained : self . store_unconstrained ,
@@ -302,6 +310,7 @@ impl Settings for TransformedNutsSettings {
302310
303311 let options = NutsOptions {
304312 maxdepth : self . maxdepth ,
313+ mindepth : self . mindepth ,
305314 store_gradient : self . store_gradient ,
306315 store_divergences : self . store_divergences ,
307316 store_unconstrained : self . store_unconstrained ,
0 commit comments