diff --git a/docs/notebooks/FAMOS_ModelSelection.ipynb b/docs/notebooks/FAMOS_ModelSelection.ipynb
index 1228085..15a3bff 100644
--- a/docs/notebooks/FAMOS_ModelSelection.ipynb
+++ b/docs/notebooks/FAMOS_ModelSelection.ipynb
@@ -14,13 +14,16 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
- "!wget -q https://github.com/copasi/basico/raw/a4ebfa0575b3a0c569ea7274bed71657207c883e/tests/famos.zip\n",
- "!unzip -qq -o famos.zip\n",
- "!rm -f famos.zip"
+ "import os\n",
+ "\n",
+ "if not os.path.exists('famos'):\n",
+ " !wget -q https://github.com/copasi/basico/raw/a4ebfa0575b3a0c569ea7274bed71657207c883e/tests/famos.zip\n",
+ " !unzip -qq -o famos.zip\n",
+ " !rm -f famos.zip"
]
},
{
@@ -32,7 +35,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -50,7 +53,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +73,7 @@
" # that the following parameter estimation is based on the result of the genetic algorithm\n",
" basico.run_parameter_estimation(method=basico.PE.GENETIC_ALGORITHM_SR, update_model=True,\n",
" settings={'method': {\n",
- " 'Number of Generations': 5,\n",
+ " 'Number of Generations': 50,\n",
" 'Population Size': 10,\n",
" 'Stop after # Stalled Generations': 30\n",
" }})\n",
@@ -92,7 +95,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -109,18 +112,21 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
- "ename": "NameError",
- "evalue": "name 'best' is not defined",
- "output_type": "error",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
- "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
- "Cell \u001b[0;32mIn[2], line 14\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Helper method to view model attributes.\"\"\"\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\"\"\u001b[39m\u001b[38;5;130;01m\\\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;124mModel subspace ID: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmodel\u001b[38;5;241m.\u001b[39mmodel_subspace_id\u001b[38;5;132;01m}\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[38;5;124m\"\"\"\u001b[39m\n\u001b[1;32m 12\u001b[0m )\n\u001b[0;32m---> 14\u001b[0m print_model(\u001b[43mbest\u001b[49m)\n",
- "\u001b[0;31mNameError\u001b[0m: name 'best' is not defined"
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Model subspace ID: M\n",
+ "PEtab YAML location: famos\\petab\\petab_problem.yaml\n",
+ "Custom model parameters: {'a_0ac_k05': 1, 'a_0ac_k08': 'estimate', 'a_0ac_k12': 1, 'a_0ac_k16': 1, 'a_k05_k05k08': 1, 'a_k05_k05k12': 'estimate', 'a_k05_k05k16': 1, 'a_k08_k05k08': 1, 'a_k08_k08k12': 1, 'a_k08_k08k16': 1, 'a_k12_k05k12': 'estimate', 'a_k12_k08k12': 1, 'a_k12_k12k16': 1, 'a_k16_k05k16': 1, 'a_k16_k08k16': 1, 'a_k16_k12k16': 'estimate', 'a_k05k08_k05k08k12': 1, 'a_k05k08_k05k08k16': 1, 'a_k05k12_k05k08k12': 'estimate', 'a_k05k12_k05k12k16': 1, 'a_k05k16_k05k08k16': 1, 'a_k05k16_k05k12k16': 1, 'a_k08k12_k05k08k12': 1, 'a_k08k12_k08k12k16': 1, 'a_k08k16_k05k08k16': 1, 'a_k08k16_k08k12k16': 1, 'a_k12k16_k05k12k16': 1, 'a_k12k16_k08k12k16': 'estimate', 'a_k05k08k12_4ac': 1, 'a_k05k08k16_4ac': 1, 'a_k05k12k16_4ac': 1, 'a_k08k12k16_4ac': 'estimate'}\n",
+ "Estimated parameters: {'a_0ac_k08': 0.40850943314624066, 'a_k05_k05k12': 30.888198874548916, 'a_k12_k05k12': 8.267792929375059, 'a_k16_k12k16': 10.424806768306713, 'a_k05k12_k05k08k12': 4.872782778438724, 'a_k12k16_k08k12k16': 33.037715020026056, 'a_k08k12k16_4ac': 53.80175865381943, 'a_b': 0.06675795541326442}\n",
+ "Model hash: M-01000100001000010010000000010001\n",
+ "Model ID: M-01000100001000010010000000010001\n",
+ "Criterion.AICC: -1708.1109924742839\n",
+ "\n"
]
}
],
@@ -132,6 +138,7 @@
"Model subspace ID: {model.model_subspace_id}\n",
"PEtab YAML location: {model.petab_yaml}\n",
"Custom model parameters: {model.parameters}\n",
+ "Estimated parameters: {model.estimated_parameters}\n",
"Model hash: {model.get_hash()}\n",
"Model ID: {model.model_id}\n",
"{problem.criterion}: {model.get_criterion(problem.criterion, compute=False)}\n",
@@ -141,95 +148,535 @@
"print_model(best)"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "finally lets look at the path that we took:"
+ ]
+ },
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " method | \n",
+ " # candidates | \n",
+ " predecessor change | \n",
+ " current model criterion | \n",
+ " current model | \n",
+ " candidate changes | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " most_distant | \n",
+ " 17 | \n",
+ " [] | \n",
+ " inf | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05k12_k05k08k12', 'a_... | \n",
+ " [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " forward | \n",
+ " 16 | \n",
+ " ['a_k05_k05k12'] | \n",
+ " -1688.480722 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " backward | \n",
+ " 16 | \n",
+ " [] | \n",
+ " -1688.480722 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " backward | \n",
+ " 15 | \n",
+ " ['a_k12_k08k12'] | \n",
+ " -1690.781213 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " backward | \n",
+ " 14 | \n",
+ " ['a_k08k16_k08k12k16'] | \n",
+ " -1693.062200 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 5 | \n",
+ " backward | \n",
+ " 13 | \n",
+ " ['a_k05k16_k05k12k16'] | \n",
+ " -1695.323944 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 6 | \n",
+ " backward | \n",
+ " 12 | \n",
+ " ['a_k05k12_k05k12k16'] | \n",
+ " -1697.564277 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 7 | \n",
+ " backward | \n",
+ " 11 | \n",
+ " ['a_k08_k08k12'] | \n",
+ " -1699.774524 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 8 | \n",
+ " backward | \n",
+ " 10 | \n",
+ " ['a_k08_k05k08'] | \n",
+ " -1701.947835 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 9 | \n",
+ " backward | \n",
+ " 9 | \n",
+ " ['a_k08_k08k16'] | \n",
+ " -1704.098940 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 10 | \n",
+ " backward | \n",
+ " 8 | \n",
+ " ['a_k08k16_k05k08k16'] | \n",
+ " -1706.240108 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 11 | \n",
+ " backward | \n",
+ " 7 | \n",
+ " ['a_k12_k12k16'] | \n",
+ " -1708.110992 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 12 | \n",
+ " forward | \n",
+ " 23 | \n",
+ " [] | \n",
+ " -1708.110992 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... | \n",
+ "
\n",
+ " \n",
+ " 13 | \n",
+ " lateral | \n",
+ " 168 | \n",
+ " [] | \n",
+ " -1708.110992 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k05', 'a_k12_k05k12'], ['a_0ac_k05', ... | \n",
+ "
\n",
+ " \n",
+ " 14 | \n",
+ " lateral | \n",
+ " 0 | \n",
+ " [] | \n",
+ " -1708.110992 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [] | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
"text/plain": [
- "{'a_0ac_k05': 1,\n",
- " 'a_0ac_k08': 'estimate',\n",
- " 'a_0ac_k12': 1,\n",
- " 'a_0ac_k16': 1,\n",
- " 'a_k05_k05k08': 1,\n",
- " 'a_k05_k05k12': 'estimate',\n",
- " 'a_k05_k05k16': 1,\n",
- " 'a_k08_k05k08': 1,\n",
- " 'a_k08_k08k12': 1,\n",
- " 'a_k08_k08k16': 1,\n",
- " 'a_k12_k05k12': 'estimate',\n",
- " 'a_k12_k08k12': 1,\n",
- " 'a_k12_k12k16': 1,\n",
- " 'a_k16_k05k16': 1,\n",
- " 'a_k16_k08k16': 1,\n",
- " 'a_k16_k12k16': 'estimate',\n",
- " 'a_k05k08_k05k08k12': 1,\n",
- " 'a_k05k08_k05k08k16': 1,\n",
- " 'a_k05k12_k05k08k12': 'estimate',\n",
- " 'a_k05k12_k05k12k16': 1,\n",
- " 'a_k05k16_k05k08k16': 1,\n",
- " 'a_k05k16_k05k12k16': 1,\n",
- " 'a_k08k12_k05k08k12': 1,\n",
- " 'a_k08k12_k08k12k16': 1,\n",
- " 'a_k08k16_k05k08k16': 1,\n",
- " 'a_k08k16_k08k12k16': 1,\n",
- " 'a_k12k16_k05k12k16': 1,\n",
- " 'a_k12k16_k08k12k16': 'estimate',\n",
- " 'a_k05k08k12_4ac': 1,\n",
- " 'a_k05k08k16_4ac': 1,\n",
- " 'a_k05k12k16_4ac': 1,\n",
- " 'a_k08k12k16_4ac': 'estimate'}"
+ " method # candidates predecessor change \\\n",
+ "0 most_distant 17 [] \n",
+ "1 forward 16 ['a_k05_k05k12'] \n",
+ "2 backward 16 [] \n",
+ "3 backward 15 ['a_k12_k08k12'] \n",
+ "4 backward 14 ['a_k08k16_k08k12k16'] \n",
+ "5 backward 13 ['a_k05k16_k05k12k16'] \n",
+ "6 backward 12 ['a_k05k12_k05k12k16'] \n",
+ "7 backward 11 ['a_k08_k08k12'] \n",
+ "8 backward 10 ['a_k08_k05k08'] \n",
+ "9 backward 9 ['a_k08_k08k16'] \n",
+ "10 backward 8 ['a_k08k16_k05k08k16'] \n",
+ "11 backward 7 ['a_k12_k12k16'] \n",
+ "12 forward 23 [] \n",
+ "13 lateral 168 [] \n",
+ "14 lateral 0 [] \n",
+ "\n",
+ " current model criterion \\\n",
+ "0 inf \n",
+ "1 -1688.480722 \n",
+ "2 -1688.480722 \n",
+ "3 -1690.781213 \n",
+ "4 -1693.062200 \n",
+ "5 -1695.323944 \n",
+ "6 -1697.564277 \n",
+ "7 -1699.774524 \n",
+ "8 -1701.947835 \n",
+ "9 -1704.098940 \n",
+ "10 -1706.240108 \n",
+ "11 -1708.110992 \n",
+ "12 -1708.110992 \n",
+ "13 -1708.110992 \n",
+ "14 -1708.110992 \n",
+ "\n",
+ " current model \\\n",
+ "0 ['a_0ac_k08', 'a_b', 'a_k05k12_k05k08k12', 'a_... \n",
+ "1 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "2 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "3 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "4 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "5 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "6 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "7 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "8 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "9 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "10 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "11 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "12 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "13 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "14 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "\n",
+ " candidate changes \n",
+ "0 [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... \n",
+ "1 [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... \n",
+ "2 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "3 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "4 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "5 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "6 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "7 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "8 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "9 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "10 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "11 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "12 [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... \n",
+ "13 [['a_0ac_k05', 'a_k12_k05k12'], ['a_0ac_k05', ... \n",
+ "14 [] "
]
},
- "execution_count": 10,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "best.parameters\n"
+ "import pandas as pd\n",
+ "\n",
+ "# Read the TSV file\n",
+ "summary_df = pd.read_csv('output/summary.tsv', sep='\\t')\n",
+ "summary_df"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "and the expected summary:"
]
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " method | \n",
+ " # candidates | \n",
+ " predecessor change | \n",
+ " current model criterion | \n",
+ " current model | \n",
+ " candidate changes | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " forward | \n",
+ " 17 | \n",
+ " [] | \n",
+ " inf | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05k12_k05k08k12', 'a_... | \n",
+ " [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " forward | \n",
+ " 16 | \n",
+ " ['a_k05_k05k12'] | \n",
+ " -1688.4806604640246 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " backward | \n",
+ " 16 | \n",
+ " [] | \n",
+ " -1688.4806604640246 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " backward | \n",
+ " 15 | \n",
+ " ['a_k08_k08k16'] | \n",
+ " -1690.7812030034663 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " backward | \n",
+ " 14 | \n",
+ " ['a_k05k16_k05k12k16'] | \n",
+ " -1693.0621897450123 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 5 | \n",
+ " backward | \n",
+ " 13 | \n",
+ " ['a_k08_k08k12'] | \n",
+ " -1695.323741885311 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 6 | \n",
+ " backward | \n",
+ " 12 | \n",
+ " ['a_k05k12_k05k12k16'] | \n",
+ " -1697.5623869086814 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 7 | \n",
+ " backward | \n",
+ " 11 | \n",
+ " ['a_k12_k08k12'] | \n",
+ " -1699.7744801865597 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 8 | \n",
+ " backward | \n",
+ " 10 | \n",
+ " ['a_k08k16_k08k12k16'] | \n",
+ " -1701.9477568144061 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 9 | \n",
+ " backward | \n",
+ " 9 | \n",
+ " ['a_k08_k05k08'] | \n",
+ " -1704.0989381094057 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 10 | \n",
+ " backward | \n",
+ " 8 | \n",
+ " ['a_k08k16_k05k08k16'] | \n",
+ " -1706.240107896267 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 11 | \n",
+ " backward | \n",
+ " 7 | \n",
+ " ['a_k12_k12k16'] | \n",
+ " -1708.110992470788 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... | \n",
+ "
\n",
+ " \n",
+ " 12 | \n",
+ " forward | \n",
+ " 23 | \n",
+ " [] | \n",
+ " -1708.110992470788 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... | \n",
+ "
\n",
+ " \n",
+ " 13 | \n",
+ " lateral | \n",
+ " 168 | \n",
+ " [] | \n",
+ " -1708.110992470788 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [['a_0ac_k05', 'a_0ac_k08'], ['a_0ac_k05', 'a_... | \n",
+ "
\n",
+ " \n",
+ " 14 | \n",
+ " lateral | \n",
+ " 0 | \n",
+ " [] | \n",
+ " -1708.110992470788 | \n",
+ " ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... | \n",
+ " [] | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
"text/plain": [
- "{'a_0ac_k08': 0.4085094414628759,\n",
- " 'a_k05_k05k12': 30.888199302449056,\n",
- " 'a_k12_k05k12': 8.267793085364918,\n",
- " 'a_k16_k12k16': 10.424806975437063,\n",
- " 'a_k05k12_k05k08k12': 4.872782833429837,\n",
- " 'a_k12k16_k08k12k16': 33.03771578079315,\n",
- " 'a_k08k12k16_4ac': 53.80176047873337,\n",
- " 'a_b': 0.06675795470746987}"
+ " method # candidates predecessor change \\\n",
+ "0 forward 17 [] \n",
+ "1 forward 16 ['a_k05_k05k12'] \n",
+ "2 backward 16 [] \n",
+ "3 backward 15 ['a_k08_k08k16'] \n",
+ "4 backward 14 ['a_k05k16_k05k12k16'] \n",
+ "5 backward 13 ['a_k08_k08k12'] \n",
+ "6 backward 12 ['a_k05k12_k05k12k16'] \n",
+ "7 backward 11 ['a_k12_k08k12'] \n",
+ "8 backward 10 ['a_k08k16_k08k12k16'] \n",
+ "9 backward 9 ['a_k08_k05k08'] \n",
+ "10 backward 8 ['a_k08k16_k05k08k16'] \n",
+ "11 backward 7 ['a_k12_k12k16'] \n",
+ "12 forward 23 [] \n",
+ "13 lateral 168 [] \n",
+ "14 lateral 0 [] \n",
+ "\n",
+ " current model criterion \\\n",
+ "0 inf \n",
+ "1 -1688.4806604640246 \n",
+ "2 -1688.4806604640246 \n",
+ "3 -1690.7812030034663 \n",
+ "4 -1693.0621897450123 \n",
+ "5 -1695.323741885311 \n",
+ "6 -1697.5623869086814 \n",
+ "7 -1699.7744801865597 \n",
+ "8 -1701.9477568144061 \n",
+ "9 -1704.0989381094057 \n",
+ "10 -1706.240107896267 \n",
+ "11 -1708.110992470788 \n",
+ "12 -1708.110992470788 \n",
+ "13 -1708.110992470788 \n",
+ "14 -1708.110992470788 \n",
+ "\n",
+ " current model \\\n",
+ "0 ['a_0ac_k08', 'a_b', 'a_k05k12_k05k08k12', 'a_... \n",
+ "1 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "2 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "3 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "4 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "5 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "6 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "7 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "8 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "9 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "10 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "11 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "12 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "13 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "14 ['a_0ac_k08', 'a_b', 'a_k05_k05k12', 'a_k05k12... \n",
+ "\n",
+ " candidate changes \n",
+ "0 [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... \n",
+ "1 [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... \n",
+ "2 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "3 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "4 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "5 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "6 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "7 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "8 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "9 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "10 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "11 [['a_0ac_k08'], ['a_k05_k05k12'], ['a_k05k12_k... \n",
+ "12 [['a_0ac_k05'], ['a_0ac_k12'], ['a_0ac_k16'], ... \n",
+ "13 [['a_0ac_k05', 'a_0ac_k08'], ['a_0ac_k05', 'a_... \n",
+ "14 [] "
]
},
- "execution_count": 11,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "best.estimated_parameters"
+ "summary_df = pd.read_csv('famos/expected_summary.tsv', sep='\\t')\n",
+ "summary_df"
]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "env-basico",
+ "display_name": "env-select",
"language": "python",
"name": "python3"
},
@@ -243,7 +690,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.11.9"
+ "version": "3.13.0"
}
},
"nbformat": 4,