Skip to content

Commit

Permalink
new small scale env
Browse files Browse the repository at this point in the history
  • Loading branch information
olive004 committed Oct 21, 2024
1 parent 44958b9 commit 3ed75b2
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 10 deletions.
10 changes: 7 additions & 3 deletions notebooks/18_visualise_param_scan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4739,9 +4739,13 @@
"# np.power(df['Sensitivity'], -2) + 100 * np.power(df['Precision'], -2) + 0.01 * np.power(df['Fold change'], -2)\n",
"# )\n",
"\n",
"df['Adaptation'] = df['Sensitivity'] * np.where(df['Precision'] > 1e2, 1e2, df['Precision']) \n",
"df['Adaptation'] = np.where(df['Adaptation'] == np.inf, 0, df['Adaptation'])\n",
"df['Adaptation'] = np.where(df['Adaptation'] == -np.inf, 0, df['Adaptation'])\n",
"def calc_adaptation(s, p):\n",
" adaptation = s * np.where(p > 1e2, 1e2, p)\n",
" adaptation = np.where(adaptation == np.inf, 0, adaptation)\n",
" adaptation = np.where(adaptation == -np.inf, 0, adaptation)\n",
" return adaptation\n",
"\n",
"df['Adaptation'] = calc_adaptation(df['Sensitivity'], df['Precision'])\n",
"\n",
"fig = plt.figure(figsize=(8, 7))\n",
"ax = plt.subplot(1,1,1)\n",
Expand Down
Loading

0 comments on commit 3ed75b2

Please sign in to comment.