Skip to content

Commit

Permalink
fixed bug in saving unit cluster IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
berkgercek committed Sep 9, 2024
1 parent 7680718 commit 1283ba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion brainwidemap/encoding/pipelines/02_fit_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def tmp_binf(t):
"wheel_offset": -0.3,
"contnorm": 5.0,
"reduce_wheel_dim": False,
"dataset_fn": "2024-08-12_dataset_metadata.pkl",
"dataset_fn": "2024-09-09_dataset_metadata.pkl",
"model": lm.LinearGLM,
"alpha_grid": {"alpha": np.logspace(-3, 2, 50)},
"contiguous": False,
Expand Down
6 changes: 3 additions & 3 deletions brainwidemap/encoding/pipelines/03_gather_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ def label_cerebellum(acronym, brainregions=BrainRegions()):
folds = []
for i in range(len(tmpfile["scores"])):
tmpdf = tmpfile["deltas"][i]["test"]
tmpdf.index = tmpfile["clu_df"].index[tmpdf.index]
tmpdf.index.name = "clu_id"
tmpdf["full_model"] = tmpfile["scores"][i]["basescores"]["test"]
tmpdf["eid"] = fitname.parts[-2]
tmpdf["pid"] = fitname.parts[-1].split("_")[1]
tmpdf["acronym"] = tmpfile["clu_regions"][tmpdf.index]
tmpdf["qc_label"] = tmpfile["clu_df"]["label"][tmpdf.index]
tmpdf["acronym"] = tmpfile["clu_regions"]
tmpdf["qc_label"] = tmpfile["clu_df"]["label"]
tmpdf["fold"] = i
tmpdf.index = tmpfile["clu_df"].iloc[tmpdf.index].cluster_id
tmpdf.index.set_names(["clu_id"], inplace=True)
folds.append(tmpdf.reset_index())
sess_master = pd.concat(folds)
Expand Down

0 comments on commit 1283ba5

Please sign in to comment.