File:Ackley 2d.png

Original file (2,954 × 2,348 pixels, file size: 1.32 MB, MIME type: image/png)

Summary

Description
English: import numpy as np

import matplotlib.pylab as plt import matplotlib matplotlib.rcParams['text.usetex'] = True

x_linspace, y_linspace = np.meshgrid(np.linspace(-5,5,1500),np.linspace(-5,5,1500))

ackley = -20. * np.exp(-0.2 * np.sqrt(0.5 * (x_linspace**2 + y_linspace**2))) - np.exp(0.5 * (np.cos(2 * np.pi * x_linspace) + np.cos(2 * np.pi * y_linspace))) + np.e + 20

plt.pcolormesh(x_linspace, y_linspace, ackley) plt.xlabel(r"$x$", fontsize=20) plt.ylabel(r"$y$", fontsize=20) plt.xticks(fontsize=18) plt.yticks(fontsize=18) cbar = plt.colorbar(ticks=np.linspace(0,14,8)) cbar.ax.tick_params(labelsize=18) cbar.set_label(r"$f\left(x,y\right)$", fontsize=20, rotation=-90, labelpad=24) contour_lines = plt.contour(x_linspace, y_linspace, ackley, colors='w', levels=np.linspace(2,14,7), linewidths=0.5) plt.gca().set_aspect(1) plt.tight_layout() plt.savefig(f'ackley-function/ackley_2d.png', dpi=500, bbox_inches='tight')

plt.close()
Date
Source Own work
Author Balluwun-enjoyer

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

A 2D plot of the Ackley function used in testing of numerical optimization algorithms.

Items portrayed in this file

depicts

20 May 2023

image/png

9f3745e17b42d3cd849229d719cd876c6bcb7a49

1,380,923 byte

2,348 pixel

2,954 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current05:09, 20 May 2023Thumbnail for version as of 05:09, 20 May 20232,954 × 2,348 (1.32 MB)Balluwun-enjoyerUploaded own work with UploadWizard

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata