@@ -133,11 +133,7 @@ def _fit_feature_space(self, X, Y, Yhat, compute_pty_=True):
133
133
self .pty_ = np .linalg .multi_dot ([S_sqrt_inv , Vt , iCsqrt , X .T , Y ])
134
134
135
135
def _fit_sample_space (self , X , Y , Yhat , W , compute_pty_ = True ):
136
- # Kt = pcovr_kernel(mixing=self.mixing, X=X, Y=Yhat)
137
136
Kt = pcovr_kernel (mixing = self .mixing , X = X , Y = Yhat )
138
- # print("PCovC X: " + str(X[:5, 0]))
139
- # print("PCovC Yhat: " + str(Yhat[:5, 0]))
140
- # print("PcovC Kt: " + str(Kt[:5, 0]))
141
137
142
138
if self .fit_svd_solver_ == "full" :
143
139
U , S , Vt = self ._decompose_full (Kt )
@@ -155,15 +151,13 @@ def _fit_sample_space(self, X, Y, Yhat, W, compute_pty_=True):
155
151
)
156
152
157
153
P = (self .mixing * X .T ) + (1.0 - self .mixing ) * W @ Yhat .T
158
- # print("PCovC P: " + str(P[:5, 0]))
154
+
159
155
S_sqrt_inv = np .diagflat ([1.0 / np .sqrt (s ) if s > self .tol else 0.0 for s in S ])
160
156
T = Vt .T @ S_sqrt_inv
161
157
162
158
self .pxt_ = P @ T
163
159
self .ptx_ = T .T @ X
164
160
165
- # print("PcovC pxt: " + str(self.pxt_[:5, 0]))
166
-
167
161
if compute_pty_ :
168
162
self .pty_ = T .T @ Y
169
163
0 commit comments