Return the least-squares reconstruction loss between X and Xhat
(self, X, Xhat)
| 245 | self.W = W |
| 246 | |
| 247 | def _loss(self, X, Xhat): |
| 248 | """Return the least-squares reconstruction loss between X and Xhat""" |
| 249 | return np.sum((X - Xhat) ** 2) |
| 250 | |
| 251 | def _update_H(self, X, W, H): |
| 252 | """Perform the fast HALS update for H""" |