Skip to content

Commit e104123

Browse files
author
miranov25
committed
Phase 2: MAD diagnostic added to V3 and V4
1 parent db0eb01 commit e104123

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

UTILS/dfextensions/groupby_regression/groupby_regression_optimized.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,10 @@ def make_parallel_fit_v4(
13511351
for j, cname in enumerate(linear_cols):
13521352
out_dict[f"{tname}_slope_{cname}{suffix}"] = beta[:, slope_start + j, t_idx]
13531353
out_dict[f"{tname}_slope_{cname}_err{suffix}"] = errors[:, slope_start + j, t_idx]
1354-
1354+
# Add RMS to diagnostics
1355+
for t_idx, tname in enumerate(fit_cols):
1356+
out_dict[f"{tname}_rms{suffix}"] = rms_arr[:, t_idx]
1357+
out_dict[f"{tname}_mad{suffix}"] = mad_arr[:, t_idx]
13551358
# Diagnostics (if enabled)
13561359
if diag:
13571360
out_dict[f"{diag_prefix}n_total"] = n_total_arr
@@ -1360,10 +1363,7 @@ def make_parallel_fit_v4(
13601363
out_dict[f"{diag_prefix}cond_xtx"] = cond_arr
13611364
out_dict[f"{diag_prefix}status"] = status_arr
13621365

1363-
# Add RMS to diagnostics
1364-
for t_idx, tname in enumerate(fit_cols):
1365-
out_dict[f"{diag_prefix}{tname}_rms{suffix}"] = rms_arr[:, t_idx]
1366-
out_dict[f"{diag_prefix}{tname}_mad{suffix}"] = mad_arr[:, t_idx]
1366+
13671367

13681368
dfGB = pd.DataFrame(out_dict)
13691369

0 commit comments

Comments
 (0)