初识机器学习 | 深入探索梯度下降算法的核心概念
发布时间
阅读量:
阅读量
import numpy as np
import matplotlib.pyplot as plt
%matplotlib
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
Using matplotlib backend: MacOSX
梯度下降求解一元二次方程
y = -1 + (x - 2.5)^2
x = np.linspace(-1,6,200)
y = (x - 2.5)**2 - 1
plt.plot(x, y)
plt.show()

还没有任何评论哟~
