Created
June 12, 2021 10:02
-
-
Save avisheknag17/e51bb802e21aee6a060b7789757bf4e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 numpy as np | |
def costly_function(x): | |
total = np.array([]) | |
for x_i in x: | |
total = np.append(total, np.sum(np.exp(-(x_i - 5) ** 2))) | |
return total + np.random.randn() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment