摘要: 没有同时更新theta(1)和theta(2) function [theta, J_history] = gradientDescent(X, y, theta, alpha, num_iters) %GRADIENTDESCENT Performs gradient descent to lea 阅读全文
posted @ 2019-04-10 20:16 Wangtn 阅读(418) 评论(0) 推荐(0) 编辑
摘要: function J = computeCost(X, y, theta) %COMPUTECOST Compute cost for linear regression % J = COMPUTECOST(X, y, theta) computes the cost of using theta 阅读全文
posted @ 2019-04-10 19:46 Wangtn 阅读(404) 评论(0) 推荐(0) 编辑