自编码算法与稀疏性
From Ufldl
Line 142: | Line 142: | ||
\hat\rho_j = \rho, | \hat\rho_j = \rho, | ||
\end{align}</math> | \end{align}</math> | ||
- | 其中, <math>\textstyle \rho</math> | + | 其中, <math>\textstyle \rho</math> 为'''稀疏参数''',通常是接近于零的值(比如, <math>\textstyle \rho = 0.05</math> )。换句话说,我们希望每个隐藏单元 <math>\textstyle j</math> 的平均激活值接近于0.05(打个比方)。为了满足这种约束条件,绝大多数隐藏单元的激活值必须非常接近于0. |
【二审】 | 【二审】 | ||
+ | |||
+ | 注意到 <math>\textstyle a^{(2)}_j</math> 表示隐藏神经元 <math>\textstyle j</math> 的激活度,但是这一表示方法中并未明确指出哪一个输入 <math>\textstyle x</math> 带来了这一激活度。所以我们将使用 <math>\textstyle a^{(2)}_j(x)</math> 来表示在给定输入为 <math>\textstyle x</math> 情况下,自编码神经网络隐藏神经元 <math>\textstyle j</math> 的激活度。 | ||
+ | 进一步,让 | ||
+ | :<math>\begin{align} | ||
+ | \hat\rho_j = \frac{1}{m} \sum_{i=1}^m \left[ a^{(2)}_j(x^{(i)}) \right] | ||
+ | \end{align}</math> | ||
+ | 表示隐藏神经元 <math>\textstyle j</math> 的平均活跃度(在训练集上取平均)。我们可以近似的加入一条限制 | ||
+ | :<math>\begin{align} | ||
+ | \hat\rho_j = \rho, | ||
+ | \end{align}</math> | ||
+ | 其中, <math>\textstyle \rho</math> 是'''稀疏性参数''',通常是一个接近于0的较小的值(比如 <math>\textstyle \rho = 0.05</math> )。换句话说,我们想要让隐藏神经元 <math>\textstyle j</math> 的平均活跃度接近0.05。为了满足这一条件,隐藏神经元的活跃度必须接近于0。 |