"""Defining what we want the model to learn """ import numpy as np import matplotlib.pyplot as plt # Define a random function with two inputs def random_function(x, y): return (np.sin(x) + x * np.cos(y) + y + 3**(x/3)) # Generate a grid of x and y values x = np.linspace(-10, 10, 100) y = np.linspace(-10, 10, 100) X, Y = np.meshgrid(x, y) # Compute the output of the random function Z = random_function(X, Y) # Create a 2D plot plt.figure(figsize=(8, 6)) contour = plt.contourf(X, Y, Z, cmap='viridis') plt.colorbar(contour, label='Function Value') plt.title('2D Plot of Objective Function') plt.xlabel('X-axis') plt.ylabel('Y-axis') plt.show()