Skip to content

Commit c0c7c65

Browse files
rosecersagoscinski
andauthored
Update src/skmatter/preprocessing/_data.py
Co-authored-by: Alexander Goscinski <[email protected]>
1 parent 2ace3ae commit c0c7c65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/skmatter/preprocessing/_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def fit(self, Knm, Kmm, y=None, sample_weight=None):
528528
# but has been changed to Knm.T @ Knm @ Kmm^{-1} to avoid the memory
529529
# overload often caused by storing n x n matrices. This is fine
530530
# for the following trace, but should not be used for other operations.
531-
Khat = Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond)
531+
Khat_trace = np.trace(Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond))
532532

533533
self.scale_ = np.sqrt(np.trace(Khat) / Knm.shape[0])
534534
else:

0 commit comments

Comments
 (0)