From a1d0784b8a6f1e7e894f25324eeff074bab9b699 Mon Sep 17 00:00:00 2001 From: Jared Galloway Date: Tue, 9 Jan 2024 15:19:12 -0800 Subject: [PATCH] move model instantiation inside loop --- notebooks/func_effect_shifts.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/func_effect_shifts.ipynb b/notebooks/func_effect_shifts.ipynb index f98a92b..780e062 100644 --- a/notebooks/func_effect_shifts.ipynb +++ b/notebooks/func_effect_shifts.ipynb @@ -148,11 +148,11 @@ "n_lasso = len(params[\"lasso_shifts\"])\n", "fig, ax = plt.subplots(n_lasso, 2, figsize=[6, n_lasso * 3])\n", "\n", - "model = multidms.Model(data)\n", "mutations_df = []\n", "for i, lasso_shift in enumerate(lasso_shifts):\n", " lasso_shift = float(lasso_shift)\n", " print(f\"Fitting model for {lasso_shift=}\")\n", + " model = multidms.Model(data)\n", " model.fit(lasso_shift=lasso_shift)\n", " mutations_df.append(\n", " model.get_mutations_df(phenotype_as_effect=True).assign(lasso_shift=lasso_shift)\n",