File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1862,6 +1862,24 @@ def get_priors(self) -> dict[str, Distribution]:
18621862
18631863 :returns: The prior distributions for the estimated parameters.
18641864 """
1865+ if not self .has_map_objective :
1866+ return {}
1867+
1868+ return {
1869+ p .id : p .prior_dist if p .prior_distribution else Uniform (p .lb , p .ub )
1870+ for p in self .parameters
1871+ if p .estimate
1872+ }
1873+
1874+ def get_startpoint_distributions (self ) -> dict [str , Distribution ]:
1875+ """Get distributions for sampling startpoints.
1876+
1877+ This will return uniform distributions over the parameter bounds
1878+ for parameters without an explicit prior.
1879+
1880+ :returns: Mapping of parameter IDs to distributions for sampling
1881+ startpoints.
1882+ """
18651883 return {
18661884 p .id : p .prior_dist if p .prior_distribution else Uniform (p .lb , p .ub )
18671885 for p in self .parameters
You can’t perform that action at this time.
0 commit comments