摘要:
欧拉函数。phi(n)表示比n小的与n互质的数的个数,比如phi(1) = 1;phi(2) = 1;phi(3) = 2;phi(4) = 2;phi(5) = 4;性质:1. 如果p为质数,则phi(p) = p-1;2. 如果p为质数并且a为正整数,则phi(p^a) = p^a - p^(a-1);证明:p为质数,所以所有可以和p相乘小于p^a的数有p^a/p = p^(a-1)个,剩下的都与p^a互质。3. phi(ab) = phi(a)*phi(b)4. n = p1^a1*p2^a2*...*pk^akphi(n) = phi(p1^a1)*phi(p2^a2)*...*phi 阅读全文
摘要:
1. hypothsis2. cost function:3. Goal:4. Gradient descent algorithmrepeat until convergence { (for j = 0 and j = 1)}note: simultaneous updateα:learning rateifα is too small, gradient descent can be slow.ifα is too large, gradient descent can overshoot the minimum. It may fail to converge, or ... 阅读全文