We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3e9df1 commit e1392cbCopy full SHA for e1392cb
facemap/neural_prediction/prediction_utils.py
@@ -238,7 +238,7 @@ def rrr_prediction(
238
rank = min(min_dim, rank)
239
corrf = np.zeros((rank, n_feats))
240
varexpf = np.zeros((rank, n_feats))
241
- varexp = np.zeros((rank, 2)) if tbin != 0 else np.zeros((rank, 1))
+ varexp = np.zeros((rank, 2)) if (tbin is not None and tbin > 1) else np.zeros((rank, 1))
242
Y_pred_test = np.zeros((len(itest), n_feats))
243
for r in range(rank):
244
Y_pred_test = X[itest] @ B[:, : r + 1] @ A[:, : r + 1].T
@@ -268,8 +268,8 @@ def rrr_prediction(
268
itest,
269
A.cpu().numpy(),
270
B.cpu().numpy(),
271
- varexpf,
272
- corrf,
+ varexpf.squeeze(),
+ corrf.squeeze(),
273
)
274
275
0 commit comments