From 9d3bb381fa3a3fdea078a8ae05c34be49ef019cc Mon Sep 17 00:00:00 2001 From: KFilippopolitis Date: Wed, 25 Nov 2026 14:08:31 +0200 Subject: [PATCH] fix: use the renamed analyses API and drop removed pca_with_transformation Follows the mip client's hard rename experiments -> analyses (Client.analyses(), My analyses / Save analysis UI labels) and removes the pca_with_transformation step, which no longer exists in exaflow. FERES/IST notebook code needed no changes; FERES works once the client sends new_column_names for categorical_column_creator. --- ECREAM/ecream_analysis_1_door_to_doctor.ipynb | 12 ++++++------ ECREAM/ecream_analysis_2_sex_and_age_by_cohort.ipynb | 8 ++++---- ...cream_analysis_3_mortality_negative_control.ipynb | 10 +++++----- ECREAM/ecream_live_demo.ipynb | 12 ++++++------ IST/ist_scenario_5_survival.ipynb | 4 ++-- algorithm_examples.py | 9 +-------- 6 files changed, 24 insertions(+), 31 deletions(-) diff --git a/ECREAM/ecream_analysis_1_door_to_doctor.ipynb b/ECREAM/ecream_analysis_1_door_to_doctor.ipynb index 60fc741..da0ad98 100644 --- a/ECREAM/ecream_analysis_1_door_to_doctor.ipynb +++ b/ECREAM/ecream_analysis_1_door_to_doctor.ipynb @@ -352,11 +352,11 @@ " return aucs\n", "\n", "\n", - "def saved_experiments():\n", - " \"\"\"The experiments saved from the web interface (My experiments), as the platform lists them.\"\"\"\n", - " items = client.experiments().list()\n", + "def saved_analyses():\n", + " \"\"\"The analyses saved from the web interface (My analyses), as the platform lists them.\"\"\"\n", + " items = client.analyses().list()\n", " if not items:\n", - " print(\"No saved experiment is listed (nothing saved yet, or the registry answers differently on this platform).\")\n", + " print(\"No saved analysis is listed (nothing saved yet, or the registry answers differently on this platform).\")\n", " return pd.DataFrame()\n", " return pd.DataFrame(items)\n", "\n", @@ -514,7 +514,7 @@ "> long waits of one TLoC patient in seven. Synthetic data, real workflow: the result was\n", "> computed on the federation without any record leaving its dataset.\n", "\n", - "In the web interface the demo ends with **Save experiment**; the notebook can list what was\n", + "In the web interface the demo ends with **Save analysis**; the notebook can list what was\n", "saved there." ] }, @@ -525,7 +525,7 @@ "metadata": {}, "outputs": [], "source": [ - "display(saved_experiments())" + "display(saved_analyses())" ] }, { diff --git a/ECREAM/ecream_analysis_2_sex_and_age_by_cohort.ipynb b/ECREAM/ecream_analysis_2_sex_and_age_by_cohort.ipynb index 0bd2465..2fe4d35 100644 --- a/ECREAM/ecream_analysis_2_sex_and_age_by_cohort.ipynb +++ b/ECREAM/ecream_analysis_2_sex_and_age_by_cohort.ipynb @@ -349,11 +349,11 @@ " return aucs\n", "\n", "\n", - "def saved_experiments():\n", - " \"\"\"The experiments saved from the web interface (My experiments), as the platform lists them.\"\"\"\n", - " items = client.experiments().list()\n", + "def saved_analyses():\n", + " \"\"\"The analyses saved from the web interface (My analyses), as the platform lists them.\"\"\"\n", + " items = client.analyses().list()\n", " if not items:\n", - " print(\"No saved experiment is listed (nothing saved yet, or the registry answers differently on this platform).\")\n", + " print(\"No saved analysis is listed (nothing saved yet, or the registry answers differently on this platform).\")\n", " return pd.DataFrame()\n", " return pd.DataFrame(items)\n", "\n", diff --git a/ECREAM/ecream_analysis_3_mortality_negative_control.ipynb b/ECREAM/ecream_analysis_3_mortality_negative_control.ipynb index a050aa3..85a065c 100644 --- a/ECREAM/ecream_analysis_3_mortality_negative_control.ipynb +++ b/ECREAM/ecream_analysis_3_mortality_negative_control.ipynb @@ -357,11 +357,11 @@ " return aucs\n", "\n", "\n", - "def saved_experiments():\n", - " \"\"\"The experiments saved from the web interface (My experiments), as the platform lists them.\"\"\"\n", - " items = client.experiments().list()\n", + "def saved_analyses():\n", + " \"\"\"The analyses saved from the web interface (My analyses), as the platform lists them.\"\"\"\n", + " items = client.analyses().list()\n", " if not items:\n", - " print(\"No saved experiment is listed (nothing saved yet, or the registry answers differently on this platform).\")\n", + " print(\"No saved analysis is listed (nothing saved yet, or the registry answers differently on this platform).\")\n", " return pd.DataFrame()\n", " return pd.DataFrame(items)\n", "\n", @@ -584,7 +584,7 @@ "> not predict death (all odds ratios 1.0; cross-validated area under the ROC curve near 0.5). This\n", "> is expected: the synthetic generator resampled the demographic, vital-sign and follow-up\n", "> blocks independently, so no association across blocks exists in these data. The platform\n", - "> found nothing because there was nothing to find; on real data the same experiment is\n", + "> found nothing because there was nothing to find; on real data the same analysis is\n", "> expected to show age and hypoxaemia as predictors.\n", "\n", "## What happens without the filter on sex\n", diff --git a/ECREAM/ecream_live_demo.ipynb b/ECREAM/ecream_live_demo.ipynb index 8a26615..ec12309 100644 --- a/ECREAM/ecream_live_demo.ipynb +++ b/ECREAM/ecream_live_demo.ipynb @@ -7,7 +7,7 @@ "source": [ "# The eCREAM federation in ten minutes: the live demo as a notebook\n", "\n", - "_The five screens of the web-interface demo and the optional third experiment, as federated\n", + "_The five screens of the web-interface demo and the optional third analysis, as federated\n", "calls with the `mip` client. Both synthetic datasets, 5,000 subjects each; no real patient data.\n", "Detail, expected results and interpretation: `docs/teaching_scenarios/` and the three analysis\n", "notebooks next to this one._\n", @@ -166,10 +166,10 @@ "id": "1f36a81b", "metadata": {}, "source": [ - "## 5. Save the experiment\n", + "## 5. Save the analysis\n", "\n", "In the web interface the demo ends with **Save experiment**: a named, re-openable, shareable\n", - "object in My experiments. The notebook can list what was saved." + "object in My analyses. The notebook can list what was saved." ] }, { @@ -179,8 +179,8 @@ "metadata": {}, "outputs": [], "source": [ - "saved = client.experiments().list()\n", - "display(pd.DataFrame(saved) if saved else \"No saved experiment is listed yet.\")" + "saved = client.analyses().list()\n", + "display(pd.DataFrame(saved) if saved else \"No saved analysis is listed yet.\")" ] }, { @@ -188,7 +188,7 @@ "id": "6e2c5c22", "metadata": {}, "source": [ - "## Optional third experiment: a model that must find nothing\n", + "## Optional third analysis: a model that must find nothing\n", "\n", "30-day mortality on age, sex and oxygen saturation, with cross-validation. *Expected:* an area\n", "under the ROC curve near 0.5, because the synthetic generator resampled the demographic,\n", diff --git a/IST/ist_scenario_5_survival.ipynb b/IST/ist_scenario_5_survival.ipynb index a5a1237..b14cc51 100644 --- a/IST/ist_scenario_5_survival.ipynb +++ b/IST/ist_scenario_5_survival.ipynb @@ -510,8 +510,8 @@ "\n", "*Expected:* women versus men 1.30 (1.23 to 1.39) with sex alone, 1.00 (0.94 to 1.06) once age is\n", "added, 0.92 (0.86 to 0.98) with all four. The women's excess deaths disappear as soon as the\n", - "model compares women and men of the same age. In the MIP interface, keep the experiment and\n", - "change only the predictors: atrial fibrillation stays in the experiment, so preprocessing keeps\n", + "model compares women and men of the same age. In the MIP interface, keep the analysis and\n", + "change only the predictors: atrial fibrillation stays in the analysis, so preprocessing keeps\n", "the same patients and the numbers are the same." ] }, diff --git a/algorithm_examples.py b/algorithm_examples.py index c911031..a67a28d 100644 --- a/algorithm_examples.py +++ b/algorithm_examples.py @@ -1,5 +1,5 @@ """ -MIP Pipeline — full stack examples (30 algorithms + preprocessing). +MIP Pipeline — full stack examples (29 algorithms + preprocessing). Run from the Jupyter workspace root: python examples/algorithm_examples.py @@ -375,13 +375,6 @@ def run_ml(ctx: dict[str, Any]) -> None: run_step("kmeans", lambda: p.kmeans(features=[age, nihss_adm, nihss_24h], k=3)) run_step("pca", lambda: p.pca(variables=[age, nihss_adm, nihss_24h])) - run_step( - "pca_with_transformation", - lambda: p.pca_with_transformation( - variables=[age, nihss_adm, nihss_24h], - data_transformation={"center": [age, nihss_adm, nihss_24h]}, - ), - ) run_step( "naive_bayes_gaussian", lambda: p.naive_bayes_gaussian(features=[age, nihss_adm], target=sex),