摘要: 梯度下降代码:function [ theta, J_history ] = GradinentDecent( X, y, theta, alpha, num_iter )m = length(y);J_history = zeros(20, 1);i = 0;temp = 0;for iter = 1:num_iter temp = temp +1; theta = theta ... 阅读全文
posted @ 2018-12-25 14:38 Ruyi.Luo 阅读(5398) 评论(1) 推荐(0) 编辑
摘要: #条件判断#布尔变量条件判断方法not True # Falsenot False #TrueTrue and False #FalseTrue or False #TrueTrue == False #FalseTrue != False #TrueTrue > False #TrueTrue >= False #TrueTrue >= = 18: print('your age is... 阅读全文
posted @ 2018-12-25 14:22 Ruyi.Luo 阅读(334) 评论(0) 推荐(0) 编辑