> For the complete documentation index, see [llms.txt](https://medomicslab.gitbook.io/medomics-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://medomicslab.gitbook.io/medomics-docs/proofs-of-concept/end-to-end-medomics-pipeline/evaluation-module-for-federated-learning.md).

# Evaluation Module for Federated Learning

The federated learning evaluation workflow is not yet fully integrated into the MEDomics graphical interface. Therefore, the evaluation and comparison of federated models must currently be performed using an external Python script.

This is the [link](https://github.com/MEDomicsLab/MEDomics_PoC3/tree/main) for the code used for this part.

The federated model is trained externally using **MEDfl**, while the evaluation procedure is reproduced outside MEDomics using the `evaluate_models.py` script. This script enables users to:

* load and compare centralized and federated models;
* correctly inject the federated weights into the PyCaret model used for inference;
* apply the same preprocessing pipeline to the evaluation datasets;
* compute performance metrics including AUC, accuracy, recall, precision, and F1-score;
* generate confusion matrices;
* perform SHAP-based feature importance analysis for selected hospitals.

This external workflow provides a temporary bridge between **MEDomics** and **MEDfl** until federated learning evaluation becomes directly available within the MEDomics interface.

For a detailed explanation of the evaluation procedure, required files, model preparation, metrics, generated outputs, and instructions for running the script, please refer to the following complementary [documentation](https://usherbrooke-my.sharepoint.com/:b:/g/personal/kalm7073_usherbrooke_ca/IQCn4Hja3DeeQaY_VJyC5Na7ATgCPVvRQGdMV0F3juIyq9U?e=Vmm1fb).

Thank you for taking the time to review this proof of concept!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://medomicslab.gitbook.io/medomics-docs/proofs-of-concept/end-to-end-medomics-pipeline/evaluation-module-for-federated-learning.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
