linearcorex.py 文件源码

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

项目:LinearCorex 作者: gregversteeg 项目源码 文件源码
def _update_syn(self, x, eta=0.5):
        """Perform one update of the weights and re-calculate moments in the SYNERGISTIC case."""
        m = self.moments
        H = (1. / m["X_i^2 | Y"] * m["X_i Z_j"].T).dot(m["X_i Z_j"])
        np.fill_diagonal(H, 0)
        R = m["X_i Z_j"].T / m["X_i^2 | Y"]
        S = np.dot(H, self.ws)
        ws = (1. - eta) * self.ws + eta * (R - S)
        m = self._calculate_moments_syn(x, ws)
        return ws, m
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号