File tree Expand file tree Collapse file tree
UTILS/dfextensions/groupby_regression Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments