Skip to content

Commit

Permalink
interim
Browse files Browse the repository at this point in the history
  • Loading branch information
MFreidank committed Oct 20, 2017
1 parent 6d9366c commit 4cc120c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pysgmcmc/diagnostics/objective_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,17 @@ def negative_log_likelihood(*args, **kwargs):
return negative_log_likelihood


# XXX: Give references again, this is the banana function from the relativistic monte carlo paper
# XXX Give references: Relativistic Monte Carlo
def banana_log_likelihood(x):
"""
Examples
----------
>>> optimum, f_opt = (0, 10), 0.
>>> np.allclose(banana_log_likelihood(optimum), f_opt)
True
"""
return -0.5 * (0.01 * x[0] ** 2 + (x[1] + 0.1 * x[0] ** 2 - 10) ** 2)


Expand Down

0 comments on commit 4cc120c

Please sign in to comment.