Skip to content

Commit 6fb2e3d

Browse files
committed
[STY] Style fix
1 parent 77e5d02 commit 6fb2e3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

netneurotools/stats.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ def get_reg_r_sq(X, y):
10051005

10061006
elif metric == 'corr':
10071007
rho, _ = sstats.pearsonr(mdl.predict(X[train_idx, :]),
1008-
y[train_idx])
1008+
y[train_idx])
10091009
train_metric.append(rho)
10101010

10111011
# prediction on test set
@@ -1015,9 +1015,9 @@ def get_reg_r_sq(X, y):
10151015
SS_Residual = sum((y[test_idx] - yhat) ** 2)
10161016
SS_Total = sum((y[test_idx] - np.mean(y[test_idx])) ** 2)
10171017
r_squared = 1 - (float(SS_Residual)) / SS_Total
1018-
adjusted_r_squared = 1-(1-r_squared)*((len(y[test_idx]) - 1) /
1019-
(len(y[test_idx]) -
1020-
X.shape[1]-1))
1018+
adjusted_r_squared = 1 - (1 - r_squared) * ((len(y[test_idx]) - 1)
1019+
/ (len(y[test_idx])
1020+
- X.shape[1] - 1))
10211021
test_metric.append(adjusted_r_squared)
10221022

10231023
elif metric == 'corr':

0 commit comments

Comments
 (0)