摘要: SVD、Word2Vec和神经网络的嵌入层都可以用来计算Embedding,这其中有什么区别,个人谈谈对它们的理解,欢迎拍砖。 如果采用Negative Sampling方式计算Word2Vec和SVD,其实三者本质上没有任何区别,都是用N个1*K的向量去乘K*N的矩阵(N可以简单理解为物品数/用户 阅读全文
posted @ 2020-03-10 22:57 jhc888007 阅读(601) 评论(0) 推荐(1) 编辑
摘要: 梯度下降的各种优化算法下面参考文献表述都很全面了,不在赘述,主要谈谈个人理解 其实对SGD的优化,跟自动控制中的PID思路其实是一样的 P(Propotion)比例项即当前偏差 I(Intergration)积分项即偏差的累积 D(differentiation)微分项即偏差的变化 SGD加入微分项 阅读全文
posted @ 2020-01-27 18:30 jhc888007 阅读(312) 评论(0) 推荐(0) 编辑
摘要: Adaboost的基本思路如下: 给每个样本一个权重,初始化所有样本权重相同 使用当前样本权重,训练一个(简单)模型 根据模型结果,给判断正确的样本降权,给判断错误的样本加权 使用新的样本权重,重新训练(简单)模型,重复若干轮 将若干轮的(简单)模型线性合并为复合模型,作为最终模型 现有包含N个样本 阅读全文
posted @ 2019-12-17 19:15 jhc888007 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1,线性回归(Linear Regression) 线性回归,即使用多维空间中的一条直线拟合样本数据,如果样本特征为: \[x = ({x_1},{x_2},...,{x_n})\] 模型假设函数如下: \[\hat y = h(w,b) = {w^T}x + b,w = ({w_1},{w_2}, 阅读全文
posted @ 2019-02-18 17:21 jhc888007 阅读(4732) 评论(0) 推荐(1) 编辑
摘要: 1,Gamma函数 Gamma函数 \[\Gamma (x) = \int_0^\infty {{e^{ - t}}{t^{x - 1}}dt} \] 是阶乘的从整数域到实数域的扩展 \[\Gamma (n) = (n - 1)!,n \in \{ 0,1,2,3...\} \] 函数递推推导如下, 阅读全文
posted @ 2018-11-23 14:28 jhc888007 阅读(568) 评论(0) 推荐(0) 编辑
摘要: 看了好多书籍和博客,讲先验后验、贝叶斯公式、两大学派、概率模型、或是逻辑回归,讲的一个比一个清楚 ,但是联系起来却理解不能 基本概念如下 先验概率:一个事件发生的概率 \[P(y)\] 后验概率:一个事件在另一个事件发生条件下的条件概率 \[P(y|x)\] 贝叶斯公式:联合概率公式直接能推导出来的 阅读全文
posted @ 2018-10-20 00:07 jhc888007 阅读(2226) 评论(1) 推荐(2) 编辑
摘要: 将博客搬至CSDN 阅读全文
posted @ 2021-05-17 12:47 jhc888007 阅读(24) 评论(0) 推荐(0) 编辑
摘要: itertools.product itertools.permutations itertools.combinations itertools.combinations_with_replacement 参考文献: https://www.cnblogs.com/dwithy/p/1165316 阅读全文
posted @ 2021-05-12 19:52 jhc888007 阅读(95) 评论(0) 推荐(0) 编辑
摘要: #include "cpp3rdlib/boost/include/boost/math/distributions.hpp" #include "cpp3rdlib/boost/include/boost/random/mersenne_twister.hpp" float rand_beta_d 阅读全文
posted @ 2021-05-07 10:47 jhc888007 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 程序坞跳动取消 defaults write com.apple.dock no-bouncing -bool TRUE killall Dock 显示隐藏文件 defaults write com.apple.finder AppleShowAllFiles -bool true killall 阅读全文
posted @ 2021-02-25 11:10 jhc888007 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 参考文献: https://blog.csdn.net/qq_34409701/article/details/52488964 阅读全文
posted @ 2021-01-20 10:49 jhc888007 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 代码如下 import numpy as npfrom scipy import stats#先将对照组与实验组的数据放入use_time_base与use_time_exp a = [] b = [] count = 1000 for i in range(count): r = random.r 阅读全文
posted @ 2021-01-06 16:08 jhc888007 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 参考文献: https://www.cnblogs.com/JAYIT/p/8627053.html 阅读全文
posted @ 2020-08-06 22:06 jhc888007 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 临时换源: pip2 install setuptools==44.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 永久换源: vim ~/.pip/pip.conf [global] index-url=http://pypi.douban.com/ 阅读全文
posted @ 2020-07-09 11:20 jhc888007 阅读(576) 评论(0) 推荐(0) 编辑
摘要: C++ extern "C" { float test_func (char *a, float b, int c); } float test_func (char *a, float b, int c) { float d = 3.14; return d; } 编译动态库 g++ pyclib 阅读全文
posted @ 2020-02-28 18:31 jhc888007 阅读(343) 评论(0) 推荐(0) 编辑