Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/skmatter/preprocessing/_data.py
Co-authored-by: Alexander Goscinski <alex.goscinski@posteo.de>
  • Loading branch information
rosecers and agoscinski authored Nov 20, 2023
commit c0c7c65197ece080a75ec57d6ef15866b684ff79
2 changes: 1 addition & 1 deletion src/skmatter/preprocessing/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def fit(self, Knm, Kmm, y=None, sample_weight=None):
# but has been changed to Knm.T @ Knm @ Kmm^{-1} to avoid the memory
# overload often caused by storing n x n matrices. This is fine
# for the following trace, but should not be used for other operations.
Khat = Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond)
Khat_trace = np.trace(Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond))

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