Likehood函数即似然函数,是概率统计中经常用到的一种函数,其原理网上很容易找到,这里就不讲了.这篇博文主要讲解Likelihood对回归模型的Probabilistic interpretation. 在我们的回归模型中由于其他因素的影响我们的预测函数为: 其中 为影响预测的其他因素或者说噪声,我们假设这些噪声IID,我们知道随机独立同分布的噪声服从Gaussian distribution,则: This implies that: 那么现在的问题转换为这样的:Given X (the
import numpy as np import random def genData(numPoints,bias,variance): x = np.zeros(shape=(numPoints,2)) y = np.zeros(shape=(numPoints)) for i in range(0,numPoints): x[i][0]=1 x[i][1]=i y[i]=(i+bias)+random.uniform(0,1)%variance return x,y def gradie
1.从方差代价函数说起(Quadratic cost) 代价函数经常用方差代价函数(即采用均方误差MSE),比如对于一个神经元(单输入单输出,sigmoid函数),定义其代价函数为: 其中y是我们期望的输出,a为神经元的实际输出[ a=σ(z), where z=wx+b ]. 在训练神经网络过程中,我们通过梯度下降算法来更新w和b,因此需要计算代价函数对w和b的导数: 然后更新w.b: w <—— w - η* ∂C/∂w = w - η * a *σ′(z) b <—— b - η* ∂C
1.Summary: Apply the chain rule to compute the gradient of the loss function with respect to the inputs. ----cs231n 2.what problems to slove? 2.1introduction 神经网络的本质是一个多层的复合函数,图: 表达式为: 上面式中的Wij就是相邻两层神经元之间的权值,它们就是深度学习需要学习的参数,也就相当于直线拟合y=k*x+b中的待求参数k和b.