摘要: 贝叶斯决策 贝叶斯公式(后验概率): p(w):每种类别分布的概率——先验概率; p(x|w):某类别下x事件发生的概率——条件概率; p(w|x):x事件已经发生,属于某类的概率——后验概率; 后验概率越大,说明x事件属于这个类的概率越大,就越有理由把事件x归到这个类下 后验概率越大,说明x事件属 阅读全文
posted @ 2019-07-01 15:28 Austin_anheqiao 阅读(1167) 评论(0) 推荐(1) 编辑
摘要: 注意不能用迭代,会超时 python: c++ 阅读全文
posted @ 2019-07-01 10:39 Austin_anheqiao 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1 //移位,通过和1进行与操作 2 class Solution { 3 public: 4 int hammingWeight(uint32_t n) { 5 int res=0; 6 while(n)//while n==0,quit while 7 { 8 res+=n&1; 9 ... 阅读全文
posted @ 2019-07-01 10:14 Austin_anheqiao 阅读(301) 评论(0) 推荐(0) 编辑