Mathematical Definition
Here m and β are the function parameters and usually taken as m=5 and β= 15.
Input Domain
Defined within the domain -2π < xi < 2π, for i = 1,2, ..., n. It can be defined on any input range as well but preferred to be as given above.
Global Minima
It has many local minima and the unique global minimum f(x*) = -1 at x* = (0,0,..., 0) for m=5 and β = 15.
Description and Features
Uni-model function.
Differentiable.
Convex.
Non-separable
Smooth
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: Vanshita Tripathi
import matplotlib.pyplot as plt
import matplotlib as mpl
from mpl_toolkits import mplot3d
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from numpy import*
%matplotlib notebook
plt.rcParams['figure.figsize'] = (6,4)
plt.rcParams['figure.dpi']=150
fig=plt.figure()
ax=fig.add_subplot(111,projection='3d')
ax= plt.axes(projection='3d')
def f(x1,x2):
a = exp( -(x1/15)**10)-2 * exp ( (-x1**2) (x2**2)) * cos(x1) * cos(x1) * cos(x2) * cos(x2)
return a
x1= linspace(-2*pi,2*pi)
x2= linspace(-2*pi,2*pi)
X1,X2= meshgrid(x1,x2)
ax.plot_surface(X1,X2,f(X1,X2), cmap='jet')
ax.set_xlabel('x1')
ax.set_ylabel('x2')
ax.set_zlabel('f(x1,x2)')
ax.view_init(10,10)
plt.show()
References:
[1] Jamil, Momin, and Xin-She Yang. "A literature survey of benchmark functions for global optimization problems." International Journal of Mathematical Modelling and Numerical Optimization 4.2 (2013): 150-194.
Comentários