numpy矩阵乘法的解惑
#源码如下: 批量梯度下降法 import numpy as np # Setting a random seed, feel free to change it and see different solutions. np.random.seed(42) # TODO: Fill in code in the function below to implement a gradient descent # step for linear regression, following a squared error rule. See the docstring # for parameters and returned variables. def MSEStep(X, y, W, b, learn_rate = 0.005): """ This function implements the gradient descent step for squared error as a performance metric. Parameters X : array of predictor features y : array of outcome values W : predictor feature coefficients b : regression function