Mathematical Definition

\[f(\mathbf{x})=f(x_1,...,x_n)=\sum_{i=1}^{n}ix_i^4+\text{random}[0,1)\]

Plots

Quartic Function

Quartic Function

Quartic Function

Contour of the function is presented below:

Quartic Function

Description and Features

  • The function is continuous.
  • The function is not convex.
  • The function is defined on n-dimensional space.
  • The function is multimodal.
  • The function is differentiable.
  • The function is separable.

Input Domain

Python

For Python, the function is implemented in the benchmarkfcns package, which can be installed from command line with pip install benchmarkfcns.

from benchmarkfcns import quartic

print(quartic([[0, 0, 0],
              [1, 1, 1]]))

MATLAB

The function can be defined on any input domain but it is usually evaluated on $x_i \in [-1.28, 1.28]$ for $i=1, …, n$.

Global Minima

The function has one global minimum $f(\textbf{x}^{\ast})=0 + \it\text{random noise}$ at $\textbf{x}^{\ast} = (0, …, 0)$.

Implementation

An implementation of the Quartic Function with MATLAB is provided below.

% Computes the value of Quartic benchmark function.
% SCORES = QUARTICFCN(X) computes the value of the Quartic function at 
% point X. QUARTICFCN accepts a matrix of size M-by-N and returns a vetor 
% SCORES of size M-by-1 in which each row contains the function value for
% each row of X.
% 
% Author: Mazhar Ansari Ardeh
% Please forward any comments or bug reports to mazhar.ansari.ardeh at
% Google's e-mail service or feel free to kindly modify the repository.
function scores = quarticfcn(x)

    n = size(x, 2);
    
    scores = 0;
    for i = 1:n
        scores = scores + i *(x(:, i) .^ 4);
    end
     
    scores = scores + rand;
end

The function can be represented in Latex as follows:

f(\mathbf{x})=f(x_1,...,x_n)=\sum_{i=1}^{n}ix_i^4+\text{random}[0,1)

References:

  • Momin Jamil and Xin-She Yang, A literature survey of benchmark functions for global optimization problems, Int. Journal of Mathematical Modelling and Numerical Optimisation}, Vol. 4, No. 2, pp. 150–194 (2013), arXiv:1308.4008
  • http://www.cs.unm.edu/~neal.holts/dga/benchmarkFunction/quartic.html
  • R. Storn, K. Price, “Differntial Evolution - A Simple and Efficient Adaptive Scheme for Global Optimization over Continuous Spaces,” Technical Report no. TR-95-012, International Computer Science Institute, Berkeley, CA, 1996. [Available Online]: (R. Storn, K. Price, “Differntial Evolution - A Simple and Efficient Adaptive Scheme for Global Optimization over Continuous Spaces,” Technical Report no. TR-95-012, International Computer Science Institute, Berkeley, CA, 1996. [Available Online] : http://www1.icsi.berkeley.edu/~storn/TR-95-012.pdf