classifiers.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:parametrix 作者: vincentchoqueuse 项目源码 文件源码
def compute_criterion(self,y):

        self.N=len(y)

        #construct matrices
        A=np.matrix(self.A)
        b=np.matrix(self.b).T
        H=np.matrix(self.H)

        x=lg.inv(H.T*H)*H.T*y                           #estimation of x

        if self.estimate_sigma2 is True:
            r,p=self.A.shape
            coef=(self.N-p)/r
            den=lg.norm(y-H*x)**2
        else:
            den=self.sigma2
            coef=1

        term1=A*x-b
        num=term1.T*lg.inv(A*lg.inv(H.T*H)*A.T)*term1
        self.criterion=coef*num/den  ## See page 274 / 345
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号