Tutorial by Examples

The 'Golden' method minimizes a unimodal function by narrowing the range in the extreme values import numpy as np from scipy.optimize import _minimize from scipy import special import matplotlib.pyplot as plt x = np.linspace(0, 10, 500) y = special.j0(x) optimize.minimize_scalar(special.j0,...
Brent's method is a more complex algorithm combination of other root-finding algorithms; however, the resulting graph isn't much different from the graph generated from the golden method. import numpy as np import scipy.optimize as opt from scipy import special import matplotlib.pyplot as plt ...
Think this could example could be better but you get the gist import numpy as np from scipy.optimize import _minimize from scipy import special import matplotlib.pyplot as plt from matplotlib import cm from numpy.random import randn x, y = np.mgrid[-2:2:100j, -2:2:100j] plt.pcolor(x, y, op...

Page 1 of 1