|
105 | 105 | "source": [ |
106 | 106 | "# If running as a Github action, just do the minimal amount of work required to check whether the code is working\n", |
107 | 107 | "if os.getenv('GITHUB_ACTIONS') is not None:\n", |
108 | | - " n_starts = 10\n", |
| 108 | + " n_starts = 15\n", |
109 | 109 | " pypesto_optimizer = pypesto.optimize.FidesOptimizer(verbose=logging.WARNING, options=dict(maxiter=10))\n", |
110 | 110 | " pypesto_engine = pypesto.engine.SingleCoreEngine()" |
111 | 111 | ] |
|
362 | 362 | "### Maximum Likelihood estimation\n", |
363 | 363 | "Using pyPESTO we can optimize for the parameter vector that maximizes the probability of observing the experimental data (maximum likelihood estimation).\n", |
364 | 364 | "\n", |
365 | | - "A multistart method with local gradient-based optimization is used and the results of each multistart can be visualized in a waterfall plot. " |
| 365 | + "A multistart method with local gradient-based optimization is used and the results of each multistart can be visualized in a waterfall plot." |
366 | 366 | ] |
367 | 367 | }, |
368 | 368 | { |
|
908 | 908 | " np.log10(regstrength) # parameter is specified as log10 scale in PEtab\n", |
909 | 909 | " )\n", |
910 | 910 | " regproblem = copy.deepcopy(pypesto_problem)\n", |
911 | | - " \n", |
| 911 | + "\n", |
912 | 912 | " # Load existing results if available\n", |
913 | 913 | " if os.path.exists(f'{name}.h5'):\n", |
914 | 914 | " regresult = pypesto.store.read_result(f'{name}.h5', problem=regproblem)\n", |
915 | 915 | " else:\n", |
916 | 916 | " regresult = None\n", |
917 | 917 | " # Overwrite\n", |
918 | 918 | " # regresult = None\n", |
919 | | - " \n", |
| 919 | + "\n", |
920 | 920 | " # Parallel multistart optimization with pyPESTO and FIDES\n", |
921 | 921 | " if n_starts > 0:\n", |
922 | 922 | " if regresult is None:\n", |
|
935 | 935 | " regresult.optimize_result.sort()\n", |
936 | 936 | " if regresult.optimize_result.x[0] is None:\n", |
937 | 937 | " raise Exception(\"All multistarts failed (n_starts is probably too small)! If this error occurred during CI, just run the workflow again.\")\n", |
938 | | - " \n", |
| 938 | + "\n", |
939 | 939 | " # Save results to disk\n", |
940 | 940 | " # pypesto.store.write_result(regresult, f'{name}.h5', overwrite=True)\n", |
941 | | - " \n", |
| 941 | + "\n", |
942 | 942 | " # Store result\n", |
943 | 943 | " regproblems[regstrength] = regproblem\n", |
944 | 944 | " regresults[regstrength] = regresult" |
|
1469 | 1469 | " np.log10(regstrength) # parameter is specified as log10 scale in PEtab\n", |
1470 | 1470 | " )\n", |
1471 | 1471 | " regproblem = copy.deepcopy(pypesto_problem)\n", |
1472 | | - " \n", |
| 1472 | + "\n", |
1473 | 1473 | " # Load existing results if available\n", |
1474 | 1474 | " if os.path.exists(f'{name}.h5'):\n", |
1475 | 1475 | " regresult = pypesto.store.read_result(f'{name}.h5', problem=regproblem)\n", |
1476 | 1476 | " else:\n", |
1477 | 1477 | " regresult = None\n", |
1478 | 1478 | " # Overwrite\n", |
1479 | 1479 | " # regresult = None\n", |
1480 | | - " \n", |
| 1480 | + "\n", |
1481 | 1481 | " # Parallel multistart optimization with pyPESTO and FIDES\n", |
1482 | 1482 | " if n_starts > 0:\n", |
1483 | 1483 | " if regresult is None:\n", |
|
1496 | 1496 | " regresult.optimize_result.sort()\n", |
1497 | 1497 | " if regresult.optimize_result.x[0] is None:\n", |
1498 | 1498 | " raise Exception(\"All multistarts failed (n_starts is probably too small)! If this error occurred during CI, just run the workflow again.\")\n", |
1499 | | - " \n", |
| 1499 | + "\n", |
1500 | 1500 | " # Save results to disk\n", |
1501 | 1501 | " # pypesto.store.write_result(regresult, f'{name}.h5', overwrite=True)\n", |
1502 | | - " \n", |
| 1502 | + "\n", |
1503 | 1503 | " # Store result\n", |
1504 | 1504 | " regproblems[regstrength] = regproblem\n", |
1505 | 1505 | " regresults[regstrength] = regresult" |
|
1934 | 1934 | "## Bibliography\n", |
1935 | 1935 | "Schelker, M. et al. (2012). “Comprehensive estimation of input signals and dynamics in biochemical reaction networks”. In: Bioinformatics 28.18, pp. i529–i534. doi: [10.1093/bioinformatics/bts393](https://doi.org/10.1093/bioinformatics/bts393).\n", |
1936 | 1936 | "\n", |
1937 | | - "Swameye, I. et al. (2003). “Identification of nucleocytoplasmic cycling as a remote sensor in cellular signaling by databased modeling”. In: Proceedings of the National Academy of Sciences 100.3, pp. 1028–1033. doi: [10.1073/pnas.0237333100](https://doi.org/10.1073/pnas.0237333100)." |
| 1937 | + "Swameye, I. et al. (2003). “Identification of nucleocytoplasmic cycling as a remote sensor in cellular signaling by databased modeling”. In: Proceedings of the National Academy of Sciences 100.3, pp. 1028–1033. doi: [10.1073/pnas.0237333100](https://doi.org/10.1073/pnas.0237333100).\n" |
1938 | 1938 | ] |
1939 | 1939 | } |
1940 | 1940 | ], |
|
0 commit comments