• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ying_vincent
博客园    首页    新随笔    联系   管理    订阅  订阅
2013年6月23日
Algorithm: Euler function
摘要: 欧拉函数。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 阅读全文
posted @ 2013-06-23 13:40 ying_vincent 阅读(224) 评论(0) 推荐(0)
Machine Learning No.1: Linear regression with one variable
摘要: 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 ... 阅读全文
posted @ 2013-06-23 11:03 ying_vincent 阅读(140) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3