自我学习

From Ufldl

Jump to: navigation, search
(Learning features)
(On pre-processing the data)
Line 44: Line 44:
最终,可以训练出一个有监督学习算法(例如svm,logistic regression等),得到一个判别函数对<math>\textstyle y</math>值进行预测。预测过程如下:给定一个测试样本<math>\textstyle x_{\rm test}</math>,重复之前的过程,将其送入稀疏自编码器,得到<math>\textstyle a_{\rm test}</math>。然后将<math>\textstyle a_{\rm test}</math>(或者<math>\textstyle (x_{\rm test}, a_{\rm test})</math>)送入分类器中,得到预测值。
最终,可以训练出一个有监督学习算法(例如svm,logistic regression等),得到一个判别函数对<math>\textstyle y</math>值进行预测。预测过程如下:给定一个测试样本<math>\textstyle x_{\rm test}</math>,重复之前的过程,将其送入稀疏自编码器,得到<math>\textstyle a_{\rm test}</math>。然后将<math>\textstyle a_{\rm test}</math>(或者<math>\textstyle (x_{\rm test}, a_{\rm test})</math>)送入分类器中,得到预测值。
-
== On pre-processing the data ==
+
==数据预处理==
-
'''[初译]'''
+
-
有关数据预处理
+
-
'''[一审]'''
+
-
数据预处理
+
-
 
+
在特征学习阶段,我们从未标注训练集<math>\textstyle \{ x_u^{(1)}, x_u^{(2)}, \ldots, x_u^{(m_u)}\}</math>中学习,这一过程中可能计算了各种数据预处理参数。例如计算数据均值并且对数据做均值标准化(mean normalization);或者对原始数据做主成分分析(PCA),然后将原始数据表示为<math>\textstyle U^Tx</math>(又或者使用PCA白化或ZCA白化)。这样的话,有必要将这些参数保存起来,并且在后面的训练和测试阶段使用同样的参数,以保证数据进入稀疏自编码神经网络之前经过了同样的变换。例如,如果对未标注数据集进行PCA预处理,就必须将得到的矩阵<math>\textstyle U</math>保存起来,并且应用到有标注训练集和测试集上;而不能使用有标注训练集重新估计出一个不同的矩阵<math>\textstyle U</math>(也不能重新计算均值并做均值标准化),否则的话可能得到一个完全不一致的数据预处理操作,导致进入自编码器的数据分布迥异于训练自编码器时的数据分布。
-
'''[原文]'''
+
-
During the feature learning stage where we were learning from the unlabeled training set
+
-
<math>\textstyle \{ x_u^{(1)}, x_u^{(2)}, \ldots, x_u^{(m_u)}\}</math>, we may have computed
+
-
various pre-processing parameters.  For example, one may have computed
+
-
a mean value of the data and subtracted off this mean to perform mean normalization,
+
-
or used PCA to compute a matrix <math>\textstyle U</math> to represent the data as <math>\textstyle U^Tx</math> (or used
+
-
PCA
+
-
whitening or ZCA whitening).  If this is the case, then it is important to
+
-
save away these preprocessing parameters, and to use the ''same'' parameters
+
-
during the labeled training phase and the test phase, so as to make sure
+
-
we are always transforming the data the same way to feed into the autoencoder.
+
-
In particular, if we have computed a matrix <math>\textstyle U</math> using the unlabeled data and PCA,
+
-
we should keep the ''same'' matrix <math>\textstyle U</math> and use it to preprocess the
+
-
labeled examples and the test data.  We should '''not''' re-estimate a
+
-
different <math>\textstyle U</math> matrix (or data mean for mean normalization, etc.) using the
+
-
labeled training set, since that might result in a dramatically different
+
-
pre-processing transformation, which would make the input distribution to
+
-
the autoencoder very different from what it was actually trained on.
+
-
 
+
-
'''[初译]'''
+
-
在特征学习阶段,我们从未被标记的样本集合<math>\textstyle \{ x_u^{(1)}, x_u^{(2)}, \ldots, x_u^{(m_u)}\}</math>中学习,在这之前它们已经进行过大量的参数预处理。举个例子,假如我们已经计算出一组数据的平均值,并且进行均值化,或者使用主成分分析计算出矩阵U来表达这组数据(或者使用PCA白化或者ZCA白化)将数据表示为<math>\textstyle U^Tx</math>。在这种情况下,保存预处理的参数是很重要的,需要在被标注数据的训练阶段和测试阶段使用同样的参数。这样能保证我们总是使用相同的方式来转化数据,进入自编码神经网络的时候也能使用相同的方式。尤其是,如果已经使用了未被标记的数据和主成分分析得到矩阵<math>\textstyle U</math>,我们必须保持同样的矩阵,并且使用他们进行被标记样本以及测试数据的预处理,而不能使用标记过的训练样本,重新预估一个不同的<math>\textstyle U</math>矩阵(或者使用均值化得到的均值,等等)。其原因是,这样可能导致显著不同的预处理变化,这变化将使得自编码神经网络的输入分布迥异于实际。
+
-
 
+
-
'''[一审]'''
+
-
在特征学习阶段,我们从无类标训练数据集<math>\textstyle \{ x_u^{(1)}, x_u^{(2)}, \ldots, x_u^{(m_u)}\}</math>中进行学习,这一过程中可能计算了各种数据预处理参数。例如计算数据均值并且对数据做均值标准化(mean normalization);或者对原始数据做主成分分析(PCA),然后将原始数据表示为<math>\textstyle U^Tx</math>(又或者使用PCA白化或ZCA白化)。这样的话,有必要将这些参数保存起来,并且在后面的训练和测试阶段使用同样的参数,以保证数据进入稀疏自编码神经网络之前经过了同样的变换。例如,如果对无类标数据集进行PCA,就必须将得到矩阵<math>\textstyle U</math>保存起来,并且应用到带类标训练数据集和测试数据集上去;而不能使用带类标训练数据集重新估计出一个不同的矩阵<math>\textstyle U</math>出来(也不能重新计算均值并做均值标准化),否则的话可能得到一个完全不一致的数据预处理操作,最终导致进入自编码神经网络的数据分布也迥异于训练阶段。
+
== On the terminology of unsupervised feature learning ==
== On the terminology of unsupervised feature learning ==

Revision as of 08:56, 16 March 2013

Personal tools