Behavior 就不多说了,每个人都会考,每条军规都要准备。 SQL 考的比较简单,各种 join 各种 groupby,还有一题需要用到 rank() partition by。 Python 要求我写一个 Gradient Descent 的 pseudo code,并解释每一步的逻辑。 给大家把 deep seek 的答案放在这: `python def gradient_descent(X, y, learning_rate=0.01, num_iterations=1000): 初始化参数 m, n = X.shape theta = np.zeros(n) 参数向量 cost_history = [] 记录损失函数值 for i in range(num_iterations): 计算预测值 y_pred = np.dot(X, theta) 计算误差 error = y_pred - y 计算梯度 gradient = np.dot(X.T, error) / m 更新参数 theta = theta - learning_rate * gradient 计算损失函数值(可选) cost = np.sum(error * 2) / (2 m) cost_history.append(cost) return theta, cost_history `