Mathematical Definition
Input Domain
The function can be defined on any input domain but it is usually evaluated on xi ∈ [−5,5] for all i=1,…,n. Here, n =2.
Global Minima
The function has one global minimum at: f(x*)=−39.16599n at x*=(−2.903534,…,−2.903534).
Characteristics
The function is continuous, not convex, defined on n-dimensional space, multimodal.
Python Implementation
% Please forward any comments or bug reports in chat
Copyright 2021. INDUSMIC PRIVATE LIMITED.THERE IS NO WARRANTY, EXPRESS OR IMPLIED. WE DO NOT ASSUME ANY LIABILITY FOR THE USE OF THIS PROGRAM. If software is modified to produce derivative works, such modified software should be clearly marked. Additionally, user can redistribute it and/or modify it under the terms of the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the GNU General Public License for more details.
% for any support connect with us on help.indusmic@gmail.com
% Author: Sakshi Chadda
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
x = np.arange(-5, 5, 0.25)
y = np.arange(-5, 5, 0.25)
x, y = np.meshgrid(x, y)
z = 0.5 * ((x**4 + y**4) - 16 * (x**2 + y**2)+ 5 * (x + y))
surface = ax.plot_surface(x, y, z, cmap='gist_earth')
plt.show()
plt.contour(x,y,z)
plt.show()
plt.scatter(x, y, z)
plt.show()
References:
[1] Survajonic, Sonja & Bingham, Derek, “Virtual Library of Simulation Experiments”, sfu.ca,
https://www.sfu.ca/~ssurjano/optimization.html
Comentarios