Skip to content

Commit

Permalink
some minor stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
twallema committed Dec 26, 2024
1 parent f0097b3 commit 5293eba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pySODM/optimization/objective_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def log_prior_triangle(x, args):
Returns
-------
Log probability of sample x in light of a triangle prior distribution.
Log probability of sample x in light of a triangular prior distribution.
"""
low, high, mode = args
return triang.logpdf(x, loc=low, scale=high, c=mode)
Expand Down Expand Up @@ -235,9 +235,7 @@ def log_prior_custom(x, args):
Example use:
------------
density_my_par, bins_my_par = np.histogram(samples['my_par'], bins=20, density=True) # `samples['my_par']` is a list containing samples from a distribution
density_my_par_norm = density_my_par/np.sum(density_my_par) # normalise to probability
density_my_par, bins_my_par = np.histogram(samples['my_par'], bins=50, density=True) # a list of samples is converted to a binned PDF
prior_fcn = log_prior_custom # this function
Expand Down

0 comments on commit 5293eba

Please sign in to comment.