Machine Learning Notes I: The Standard Linear Model

we derive the standard linear model here from Bayesian prospective of view (MAP), with training set =(X,y)={(xi,yi)|i=1,...,n} , x denotes input vector of dimension D and y denotes a scalar output. w the weights vector and ξ Gaussian noise

f(x)=xTwy=f(x)+ξξ(0,σ2n)

The likelihood function

p(y|X,w)=i=1np(yi|xi,w)=i=1n12πσnexp(yixTiw2σ2n)=1(2πσ2n)n/2exp(12σ2n|yXTw|2)=(XTw,σ2nI)

further specify the prior over the parameter w , set as zero mean Gaussian with covariance matrix Σp , i.e., w(0,Σp) , the Bayesian linear model (MAP) is

p(w|y,X)=p(y|X,w)p(w)p(y|X)p(y|X,w)p(w)exp(12σ2n(yXw)T(yXw))exp(12wTΣ1pw)exp(12(ww¯)T(1σ2nXXT+Σ1p)(ww¯))

with w¯=σ2n(σ2nXXT+Σ1p)1Xy , then we have,
p(w|y,X)(1σ2n(σ2nXXT+Σ1p)1Xy,(σ2nXXT+Σ1p)1)

make predictions for x=x as

E(f|x,X,y)=f(x,w)p(w|X,y)dw=xTwp(w|X,y)dw=1σ2nxT(σ2nXXT+Σ1p)1Xy

in fact, p(f|x,X,y)(1σ2nxT(σ2nXXT+Σ1p)1Xy,xT(σ2nXXT+Σ1p)1x)

In a non-Bayesian setting, the prior is usually thought as a penalty term (Ridge Regression, L2 regularization) 12wTΣ1pw

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值