摘要:
梯度下降代码: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 ... 阅读全文
摘要:
#条件判断#布尔变量条件判断方法not True # Falsenot False #TrueTrue and False #FalseTrue or False #TrueTrue == False #FalseTrue != False #TrueTrue > False #TrueTrue >= False #TrueTrue >= = 18: print('your age is... 阅读全文