Skip to content

Commit

Permalink
update intro and mlp
Browse files Browse the repository at this point in the history
  • Loading branch information
astonzhang committed Feb 17, 2021
1 parent c700faa commit d920c2c
Show file tree
Hide file tree
Showing 39 changed files with 18 additions and 6,956 deletions.
4 changes: 2 additions & 2 deletions chapter_introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ $$l(y, y') = \sum_i (y_i - y_i')^2.$$

请注意,最有可能的类不一定是您要用于决策的类。假设你发现这个美丽的蘑菇在你的后院如 :numref:`fig_death_cap` 所示。

![Death cap---do not eat!](../img/death_cap.jpg)
![Death cap---do not eat!](../img/death-cap.jpg)
:width:`200px`
:label:`fig_death_cap`

Expand Down Expand Up @@ -221,7 +221,7 @@ $$L(\mathrm{action}| x) = E_{y \sim p(y| x)}[\mathrm{loss}(\mathrm{action},y)].$

鉴于这样的模型,那么对于任何给定的用户,我们可以检索分数最大 $y_{ij}$ 的对象集,然后可以推荐给客户。生产系统比较先进,并且在计算此类分数时考虑详细的用户活动和项目特征。:numref:`fig_deeplearning_amazon` 是亚马逊推荐的深度学习书籍样本,基于个性化算法,经过调整,以捕捉作者的偏好。

![Deep learning books recommended by Amazon.](../img/deeplearning_amazon.jpg)
![Deep learning books recommended by Amazon.](../img/deeplearning-amazon.jpg)
:label:`fig_deeplearning_amazon`

尽管推荐系统具有巨大的经济价值,但天真地建立在预测模型之上,仍然存在一些严重的概念缺陷。首先,我们只观察 * 审查反馈 *。用户优先评分他们感觉强烈的电影:您可能会注意到项目获得了许多 5 星和 1 星评级,但三星评级显然很少。此外,当前的购买习惯往往是目前使用的推荐算法的结果,但学习算法并不总是考虑到这一细节。因此,反馈循环有可能形成,推荐人系统会优先推荐一个项目,然后由于购买量增加),反过来更频繁地推荐一个项目。许多关于如何处理审查、激励和反馈循环的问题都是重要的开放研究问题。
Expand Down
4 changes: 2 additions & 2 deletions chapter_introduction/index_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ the one that you are going to use for your decision.
Assume that you find this beautiful mushroom in your backyard
as shown in :numref:`fig_death_cap`.

![Death cap---do not eat!](../img/death_cap.jpg)
![Death cap---do not eat!](../img/death-cap.jpg)
:width:`200px`
:label:`fig_death_cap`

Expand Down Expand Up @@ -852,7 +852,7 @@ detailed user activity and item characteristics into account
when computing such scores. :numref:`fig_deeplearning_amazon` is an example
of deep learning books recommended by Amazon based on personalization algorithms tuned to capture the author's preferences.

![Deep learning books recommended by Amazon.](../img/deeplearning_amazon.jpg)
![Deep learning books recommended by Amazon.](../img/deeplearning-amazon.jpg)
:label:`fig_deeplearning_amazon`

Despite their tremendous economic value, recommendation systems
Expand Down
2 changes: 1 addition & 1 deletion chapter_linear-networks/linear-regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $$l^{(i)}(\mathbf{w}, b) = \frac{1}{2} \left(\hat{y}^{(i)} - y^{(i)}\right)^2.$$

这个常数$\frac{1}{2}$不会带来本质的差别,但这样在形式上稍微简单一些。当我们对损失函数求导后常数系数为1。由于训练数据集是给我们的,并不受我们控制,所以经验误差只是关于模型参数的函数。为了进一步说明,来看下面的例子,我们为一维情况下的回归问题绘制图像,如 :numref:`fig_fit_linreg` 所示。

![用线性模型拟合数据。](../img/fit_linreg.svg)
![用线性模型拟合数据。](../img/fit-linreg.svg)
:label:`fig_fit_linreg`

由于平方误差函数中的二次方项,估计值 $\hat{y}^{(i)}$ 和观测值 $y^{(i)}$ 之间较大的差异将贡献更大的损失。为了度量模型在整个数据集上的质量,我们需计算在训练集$n$个样本上的损失均值(也等价于求和)。
Expand Down
4 changes: 2 additions & 2 deletions chapter_linear-networks/linear-regression_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ limit the expressivity of our model.
Strictly speaking, :eqref:`eq_price-area` is an *affine transformation*
of input features,
which is characterized by
a *linear transformation* of features via weighted sum, combined with
a *linear transformation* of features via weighted sum, combined with
a *translation* via the added bias.

Given a dataset, our goal is to choose
Expand Down Expand Up @@ -177,7 +177,7 @@ To make things more concrete, consider the example below
where we plot a regression problem for a one-dimensional case
as shown in :numref:`fig_fit_linreg`.

![Fit data with a linear model.](../img/fit_linreg.svg)
![Fit data with a linear model.](../img/fit-linreg.svg)
:label:`fig_fit_linreg`

Note that large differences between
Expand Down
4 changes: 2 additions & 2 deletions chapter_multilayer-perceptrons/kaggle-house-price.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def download_all(): #@save

> https://www.kaggle.com/c/house-prices-advanced-regression-techniques
![The house price prediction competition page.](../img/house_pricing.png)
![The house price prediction competition page.](../img/house-pricing.png)
:width:`400px`
:label:`fig_house_pricing`

Expand Down Expand Up @@ -448,7 +448,7 @@ train_and_pred(train_features, test_features, train_labels, test_data,
* 点击页面底部虚线框中的 “上传提交文件” 按钮,然后选择要上传的预测文件。
* 点击页面底部的 “提交” 按钮查看您的结果。

![Submitting data to Kaggle](../img/kaggle_submit2.png)
![Submitting data to Kaggle](../img/kaggle-submit2.png)
:width:`400px`
:label:`fig_kaggle_submit2`

Expand Down
6 changes: 3 additions & 3 deletions chapter_multilayer-perceptrons/kaggle-house-price_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ The URL is right here:

> https://www.kaggle.com/c/house-prices-advanced-regression-techniques
![The house price prediction competition page.](../img/house_pricing.png)
![The house price prediction competition page.](../img/house-pricing.png)
:width:`400px`
:label:`fig_house_pricing`

Expand Down Expand Up @@ -313,7 +313,7 @@ in the same way that we previously transformed
multiclass labels into vectors (see :numref:`subsec_classification-problem`).
For instance, "MSZoning" assumes the values "RL" and "RM".
Dropping the "MSZoning" feature,
two new indicator features
two new indicator features
"MSZoning_RL" and "MSZoning_RM" are created with values being either 0 or 1.
According to one-hot encoding,
if the original value of "MSZoning" is "RL",
Expand Down Expand Up @@ -664,7 +664,7 @@ The steps are quite simple:
* Click the “Upload Submission File” button in the dashed box at the bottom of the page and select the prediction file you wish to upload.
* Click the “Make Submission” button at the bottom of the page to view your results.

![Submitting data to Kaggle](../img/kaggle_submit2.png)
![Submitting data to Kaggle](../img/kaggle-submit2.png)
:width:`400px`
:label:`fig_kaggle_submit2`

Expand Down
2 changes: 1 addition & 1 deletion chapter_multilayer-perceptrons/underfit-overfit.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $$\hat{y}= \sum_{i=0}^d x^i w_i$$

高阶多项式函数比低阶多项式函数复杂得多,因为高阶多项式具有更多的参数,而且模型函数的选择范围也更宽。修复训练数据集时,较高阶多项式函数应始终实现相对于较低度多项式的训练误差(在最坏情况下,相等)。事实上,每当每个数据点的不同值为 $x$ 时,度等于数据点数的多项式函数就可以完美地拟合训练集。我们在 :numref:`fig_capacity_vs_error` 中对多项式度与欠拟合与过拟合之间的关系进行了可视化。

![Influence of model complexity on underfitting and overfitting](../img/capacity_vs_error.svg)
![Influence of model complexity on underfitting and overfitting](../img/capacity-vs-error.svg)
:label:`fig_capacity_vs_error`

### 数据集大小
Expand Down
2 changes: 1 addition & 1 deletion chapter_multilayer-perceptrons/underfit-overfit_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ can fit the training set perfectly.
We visualize the relationship between polynomial degree
and underfitting vs. overfitting in :numref:`fig_capacity_vs_error`.

![Influence of model complexity on underfitting and overfitting](../img/capacity_vs_error.svg)
![Influence of model complexity on underfitting and overfitting](../img/capacity-vs-error.svg)
:label:`fig_capacity_vs_error`

### Dataset Size
Expand Down
2 changes: 1 addition & 1 deletion chapter_preliminaries/calculus.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
直到至少2500年前,古希腊人把一个多边形分成三角形,并把它们的面积相加,才找到计算多边形面积的方法。
为了求出曲线形状(比如圆)的面积,古希腊人在这样的形状上刻内接多边形。如 :numref:`fig_circle_area` 所示,内接多边形的等长边越多,就越接近圆。这个过程也被称为*逼近法*(method of exhaustion)。

![用穷举法求圆的面积。](../img/polygon_circle.svg)
![用穷举法求圆的面积。](../img/polygon-circle.svg)
:label:`fig_circle_area`

事实上,逼近法就是 *积分*(integral calculus)(将在 :numref:`sec_integral_calculus` 中描述)的起源。2000 多年后,微积分的另一支,*微分*(differential calculus),被发明出来。在微分学最重要的应用中,优化问题考虑如何把事情做到*最好*。正如在 :numref:`subsec_norms_and_objectives` 中讨论的那样,这种问题在深度学习中是无处不在的。
Expand Down
2 changes: 1 addition & 1 deletion chapter_preliminaries/calculus_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ As shown in :numref:`fig_circle_area`,
an inscribed polygon with more sides of equal length better approximates
the circle. This process is also known as the *method of exhaustion*.

![Find the area of a circle with the method of exhaustion.](../img/polygon_circle.svg)
![Find the area of a circle with the method of exhaustion.](../img/polygon-circle.svg)
:label:`fig_circle_area`

In fact, the method of exhaustion is where *integral calculus* (will be described in :numref:`sec_integral_calculus`) originates from.
Expand Down
2 changes: 1 addition & 1 deletion chapter_preliminaries/probability.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

在前面的章节中,我们已经提到了概率,但没有明确说明它们是什么,也没有给出具体的例子。现在让我们更认真地考虑第一个例子:根据照片区分猫和狗。这听起来可能很简单,但实际上是一个艰巨的挑战。首先,问题的难度可能取决于图像的分辨率。

![不同分辨率的图像 ($10 \times 10$, $20 \times 20$, $40 \times 40$, $80 \times 80$, 和 $160 \times 160$ pixels).](../img/cat_dog_pixels.png)
![不同分辨率的图像 ($10 \times 10$, $20 \times 20$, $40 \times 40$, $80 \times 80$, 和 $160 \times 160$ pixels).](../img/cat-dog-pixels.png)
:width:`300px`
:label:`fig_cat_dog`

Expand Down
2 changes: 1 addition & 1 deletion chapter_preliminaries/probability_origin.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Entire courses, majors, theses, careers, and even departments, are devoted to pr

We have already invoked probabilities in previous sections without articulating what precisely they are or giving a concrete example. Let us get more serious now by considering the first case: distinguishing cats and dogs based on photographs. This might sound simple but it is actually a formidable challenge. To start with, the difficulty of the problem may depend on the resolution of the image.

![Images of varying resolutions ($10 \times 10$, $20 \times 20$, $40 \times 40$, $80 \times 80$, and $160 \times 160$ pixels).](../img/cat_dog_pixels.png)
![Images of varying resolutions ($10 \times 10$, $20 \times 20$, $40 \times 40$, $80 \times 80$, and $160 \times 160$ pixels).](../img/cat-dog-pixels.png)
:width:`300px`
:label:`fig_cat_dog`

Expand Down
Loading

0 comments on commit d920c2c

Please sign in to comment.