CS224d Problem set 1作业

1.assignment1里的计算题的详细推导过程

编程题里的negative sampling和第三题(a)的推导过程类似,所以就没有重新推导了

CS224d Problem set 1作业_第1张图片

CS224d Problem set 1作业_第2张图片

CS224d Problem set 1作业_第3张图片

CS224d Problem set 1作业_第4张图片

4.(a)Because over-fitting will make out model have a poor generalized error and overfit the training set. In order to improve our model's accuracy, we should introduce regularization to avoid over-fitting.

(b)That is a "v" curve shape, since less regularization will lead to under-fitting, i.e. the model doesn't catch enough features, more regularization will lead to over-fitting, i.e. the model catch noise in the training set that is also bad for our model. In the middle the complexity of our model is good, this is a trade-off between catching more features and less noise.

 

2.程序github

以下是我的cs224d github的地址,有想参考的朋友可以参考。不过写的不太好,别喷我。

https://github.com/NeighborhoodWang/CS224D-problem-set/tree/master/Psets/Pset1/assignment1

写程序的时候遇到几个问题,记录下来:

1.在python里喜欢把向量表示成一行的形式,这让我使用惯了matlab的人有点不习惯

2.把一个矩阵或者向量赋给其他变量的时候得使用x.copy()的方式,否则的话只是赋过去它的指针

3.gradient check的时候要用精度高的也就是两边都得减去eplison的那个(这个整死我了)

你可能感兴趣的:(set)