This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Distributions | |
using Statistics | |
function monotone_approx(N::Int64,n_trials::Int64,n::Int64) | |
""" | |
inputs: | |
N: the range of U([-N,N]) | |
n_trials: the number of times we generate random vectors | |
n: the 'dimension' of the random vector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import autograd.numpy as np | |
from autograd import grad | |
def U(x): | |
""" | |
definition of the symmetric potential function | |
""" | |
return (x-50.0)**2 |
OlderNewer