- 博客(23)
- 收藏
- 关注
原创 隐马尔可夫模型(HMM explained)
隐马尔可夫模型隐马尔可夫模型(Hidden Markov Model,HMM),是上世纪七十年代由美国数学家Leonard E. Baum等人提出来的,可以用于解决标注(tagging)问题,属于一种生成模型(generative model),即直接生成观测序列和状态序列的联合概率分布。1 描述1.1 术语解释:状态序列(state sequence):模型假设由一个隐藏的马尔可夫链生成一个不可观测的序列,称这个序列为状态序列,其中序列的每个时间步都代表着一个不可被观测到的状态观测序列(obs
2020-06-08 15:11:31
422
原创 NLP与对抗训练
对抗训练(Adversarial Training)简介大致可以分为下面两种类型:Injecting adversarial examples(加入对抗样本)min-max optimization.(最小最大优化)部分内容参照博客:https://nlpblog.cl.uni-heidelberg.de/index.php/2019/09/20/adversarial-training/#identifier_22_2861 Adversarial Examples(对抗样本)Szege
2020-06-04 14:44:21
827
原创 Apache Spark for Dealing with Ethereum Transactions Data
file_path = "xi_3777501to3800000 block.txt"txn_fields = [ StructField("block_id", StringType(), True), StructField("time_stamp", StringType(), True), StructField("tx_hash", StringType(),...
2020-01-15 14:22:15
305
原创 cs224笔记:Lecture 10 (Textual) Question Answering
1 Motivition: Question Answering对于大量的文本,我们经常需要一个应用来实现根据询问的问题返回相应的答案,可以大致的分为两种:1 返回一个文本,这个文本中可能包含答案这个问题可以使用传统的**信息检索/网络搜索(information retrieval/web search)**技术解决2 从一个文本段落或者文件中找答案通常这个问题被称为阅读...
2019-10-16 10:46:32
236
原创 cs224笔记:Lecture 9 a review
1 构建项目途径Look at ACL anthology for NLP papers: https://aclanthology.infoAlso look at the online proceedings of major ML conferences: NeurIPS, ICML, ICLRLook at online preprint servers, especially: ...
2019-10-16 10:45:12
233
原创 Lecture 8:Norms of Vectors and Matrices
矩阵和向量的范式(Norms for Vectors and Matrices)1 Vector NormspForm1∥x∥1=∣x1∣+⋯+∣xn∣\|x\|_1=\vert x_1 \vert+\cdots+ \vert x_n \vert∥x∥1=∣x1∣+⋯+∣xn∣2∥x∥2=∣x1∣2+⋯+∣xn∣2\|x\|_2=\sqrt{\vert x...
2019-10-12 11:21:28
439
原创 cs224笔记:Lecture 8 Machine Translation, Seq2Seq and Attention
8 Machine Translation, Seq2Seq and Attention1 Pre-Neural Machine Translation机器翻译(Machine Translation, MT)的就是将一种语言(source language)的句子翻译到另一种语言(target language)的句子。关于machine translation的研究最早能追溯到20世纪5...
2019-10-11 15:02:39
546
1
原创 Norms for Vectors and Matrices
矩阵和向量的范式(Norms for Vectors and Matrices)1 内积和范式的定义(Definitions of norms and inner product)向量范式的定义(vector norm)定义 1.1. 令 VVV 是定义在场 F\mathbf{F}F(F=R\mathbf{F} = \mathbf{R}F=R 或者 C\mathbf{C}C,即实数域或者是复...
2019-10-09 15:59:23
475
原创 cs224笔记:Lecture 7 Vanishing Gradient and fancy RNNs
Vanishing Gradient and fancy RNNs1 Vanishing Gradient(梯度消失)RNN:h(t)=σ(Whh(t−1)+Wxx(t))y^(t)=softmax(Wsh(t))\mathbf{h}^{(t)} = \sigma(\mathbf{W}_h \mathbf{h}^{(t-1)}+\mathbf{W}_x \mathbf{x}^{(t)}) ...
2019-09-27 11:10:16
204
原创 矩阵和向量的范式(Norms for Vectors and Matrices)
矩阵和向量的范式(Norms for Vectors and Matrices)1 内积和范式的定义(Definitions of norms and inner product)向量范式(vector norm)Definition 1.1. Let VVV be a vector space over the field F\mathbf{F}F(F=R\mathbf{F} = \mat...
2019-09-26 17:17:33
3892
原创 RNN Vanishing Gradient
RNN Vanishing GradientRNN Forward Propagation:h(t)=σ(Whh(t−1)+Wxx(t)+b1)y^(t)=softmax(Wsh(t)+b2))\mathbf{h}^{(t)} = \sigma(\mathbf{W}_h \mathbf{h}^{(t-1)}+\mathbf{W}_x \mathbf{x}^{(t)}+\mathbf{b}_1...
2019-09-26 13:16:40
227
原创 cs224笔记:Lecture 6 Language Models and RNNs
Language Models and RNNs1 Language ModelLanguage Model is the task of predicting what word comes next.更正式的:给定一个单词序列,x(1),x(2),...,x(t)\mathbf{x^{(1)}},\mathbf{x^{(2)}},...,\mathbf{x^{(t)}}x(1),x(2)...
2019-09-25 13:40:20
218
原创 Lecture 6: Singular Value Decomposition(SVD)
Singular Value Decomposition(SVD)compared with: S=QΛQTA=UΣVT\begin{aligned}\text{compared with: } S=Q\Lambda Q^T\\A=U\Sigma V^T\end{aligned}compared with: S=QΛQTA=UΣVTKey: ...
2019-09-24 16:59:30
192
原创 cs224笔记:Lecture 5 Dependency Parsing
Dependency ParsingLinguistic Structure: Denpendency Parsing(依存句法分析)1 Two views of linguistic structure: Constituency structure, Dependency structureParse trees(解析树,语法分析树) 用于分析句子的语法结构(syntactic stru...
2019-09-24 10:24:55
1434
2
原创 Naive Softmax&Negative Sampling
Naive Softmax&Negative SamplingNaive Softmax损失定义为:J=−logexp(uoTvc)∑w=1Vexp(uxTvc)=−logexp(uoTvc)+log∑w=1Vexp(uxTvc)=−uoTvc+log∑w=1Vexp(uxTvc)\begin{aligned}J &= -\log \frac{exp(u_o^Tv...
2019-09-20 15:56:21
966
2
原创 Lecture 7:Eckart-Young: The Closest Rank k Matrix to A
Eckart-Young: The Closest Rank k Matrix to A1 Eckart-Young Theorem(low rank approximation)If BBB has rank kkk, then ∥A−B∥≥∥A−Ak∥\lVert A-B \rVert \ge \lVert A-A_k \rVert∥A−B∥≥∥A−Ak∥说明在所有秩(rank)为...
2019-09-20 11:22:45
1950
原创 cs224笔记: Lecture 4 Backpropagation and Computation Graph
Backpropagation and Computation Graph1. Derivative w.r.t. a weight matrix还是之前的那个例子,应用chain rule求解梯度,前向计算式子如下:s=uThh=f(z)z=Wx+bs=\mathbf{u}^T\mathbf{h}\\\mathbf{h}=f(\mathbf{z})\\\mathbf{z}=\mat...
2019-09-19 17:54:51
547
1
原创 cs224笔记: Lecture 3a Matrix Calculus
Matrix Calculus1 Jacobian Matrix假设有函数f:Rn→Rmf:\mathbb{R}^n \rightarrow\mathbb{R}^mf:Rn→Rm,即将一个长度为nnn的向量映射成长度为mmm的向量,f(x)=[f1(x1,x2,...,xn),f2(x1,x2,...,xn),...,fm(x1,x2,...,xn)]\mathbf{f}(\mathbf{...
2019-09-19 09:54:34
166
3
原创 cs224笔记: Lecture 3 Neural Networks
Neural Networks1. 分类任务(Classification)(xi,yi)i=1N(\pmb{x_i}, \pmb{y_i})_{i=1}^N(xixixi,yiyiyi)i=1N其中x\pmb{x}xxx为输入(inputs),y\pmb{y}yyy为标签(labels)传统机器学习/统计学习方法:假设输入是固定的,训练softmx/...
2019-09-18 14:38:11
561
1
原创 线性代数-矩阵分解(Matrix Factorization)
A=LUA = LUA=LU(LU分解)A=QRA=QRA=QR(QR分解)A=XΛX−1A = X\Lambda X^{-1}A=XΛX−1 (谱分解)S=QΛQTS=Q\Lambda Q^TS=QΛQT (正交对角化)A=UΣVTA = U\Sigma V^TA=UΣVT(奇异值分解)1 LU分解2 QR分解3 谱分解(Spectral Decomposition)所谓的谱...
2019-09-18 08:15:11
2464
2
原创 cs224笔记: Lecture 2 Word Vectors and Word Senses
Lecture 2: Word Vectors and Word Senses1 Main Idea of Word2Vec :遍历语料库(corpus)中的每一个单词通过词向量预测周围的单词如以下单词序列,使用center单词’into’来预测它周围的单词出现的概率p(o∣c)=exp(uoTvc)∑w∈Vexp(uwTvc)p(o|c) = \frac{exp(u_o^Tv_...
2019-09-16 14:44:06
262
2
原创 贝叶斯公式到朴素贝叶斯
1 关于贝叶斯公式的一个简单的例子**贝叶斯公式(Bayes‘ Formula)**是非常简洁漂亮的一个公式,如下:Pr(B∣A)=Pr(AB)Pr(A)=Pr(B)Pr(A∣B)Pr(A)Pr(B|A) = \frac{Pr(AB)}{Pr(A)} = \frac{Pr(B)Pr(A|B)}{Pr(A)}Pr(B∣A)=Pr(A)Pr(AB)=Pr(A)Pr(B)Pr(A∣B)借助...
2019-09-12 10:26:36
266
原创 cs224笔记:Lecture 1 Introduction and Word Vectors
Lecture 1: Introduction and Word VectorsRepresenting words as discrete symbols在传统NLP使用discrete symbols表示词,即one-hot编码,各个单词向量之间是**正交(orthogonal)的,因此没有相似性(similarity)的概念。例如:motel=[0,0,0,0,1,0,0]Thote...
2019-09-12 09:48:04
281
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人