We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 code 的1.linear_regreesion_v1.ipynb文件中, 关于 grandient 函数的定义不明白?
def gradient(theta, X, y): m = X.shape[0] inner = X.T @ (X @ theta - y) # (m,n).T @ (m, 1) -> (n, 1),X @ theta等价于X.dot(theta) return inner / m
为什么是 inner = X.T @ (X @ theta - y)? 我看方程的定义是:
inner = X.T @ (X @ theta - y)
为啥不是 inner = (theta.T @ X -y) @ X ?
inner = (theta.T @ X -y) @ X
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在 code 的1.linear_regreesion_v1.ipynb文件中, 关于 grandient 函数的定义不明白?
为什么是
inner = X.T @ (X @ theta - y)
?我看方程的定义是:
为啥不是
inner = (theta.T @ X -y) @ X
?The text was updated successfully, but these errors were encountered: