# Phase 5: Model evaluation

Assess and compare model performance using statistical metrics like AUC, and explainable AI techniques to understand model predictions. This allows for identification of the most reliable models and extraction of biologically meaningful insights from models.

<details>

<summary>1. Select queue for exploration</summary>

1. Navigate to the **Dashboard** and select your predictive analysis from the queue
   1. The queue number selected is indicated in the pink box at the top right of the PANDORA interface.

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FhHXhEoMDd6UKoLc8zNBn%2FFF_%20Phase%205_Dashboard_Select%20Queue.png?alt=media&#x26;token=1d7135c1-a207-4f05-94aa-d27a6d5c5ae5" alt=""><figcaption></figcaption></figure>

2. Navigate to **Predictive** -> **Exploration**

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FGB3JbE922jIHPogeYFfb%2FFF_%20Phase%205_Exploration_Navigate.png?alt=media&#x26;token=3c97aaae-2b05-4fad-bf16-735f9ff5b972" alt=""><figcaption></figcaption></figure>

3. Configure **Exploration** space
   1. Select all Response outcomes
   2. Select metrics of interest
   3. Select dataset
   4. Select models to evaluate

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2Ftc6tqdWJKd9Eex7DJOfu%2FFF_%20Phase%205_Exploration_Configure%20Space.png?alt=media&#x26;token=5f1c2e91-3733-4537-83d0-22233903bbfe" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>2. Evaluate performance of the models</summary>

1. Compare metrics
   1. Compare models based on the metrics selected in 3.b that are shown in the table from part 3.d. Special attention can be given to `Predictive AUC` and `Training AUC` scores for each model **(Area Under the ROC Curve)**. More info about metrics [here](https://app.gitbook.com/s/9LdC62ZpkxqvCBTPwVZU/data-analysis/predictive/exploration#model-metrics).
2. Select the **ROC Curve Analysis** tab in Exploration
3. Compare ROC Curves for each model to assess classification performance and identify the best models.

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FP7xFRkqCAPUXOYgpuJAa%2FFF_%20Phase%205_Exploration_ROC%20Curves_v2.png?alt=media&#x26;token=bd661afe-ad93-4fc5-8bcc-0990e447609f" alt=""><figcaption></figcaption></figure>

4. Ensure multiple models are selected, then select the **Training Summary** tab in Exploration
   1. Compare the metrics shown on the box plots for multiple models.
   2. The **Performance measurements** section can help determine if there are significant differences between model metric values.
   3. The **Model fitting results summary** provides the five-number summary of each model that is visualized in the box plots.

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FDaHzEAQCR2rPVEcnZNut%2FFF_%20Phase%205_Exploration_Training%20Summary.png?alt=media&#x26;token=6061fffa-ea96-4db0-8cec-7077824433d2" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>3. Identify key predictors (Variable Importance score)</summary>

1. Select the top model and select the **Variable Importance** tab in **Exploration**.
2. While on the Variable Importance tab, locate the **Variable Importance** sub-tab
   1. A bar plot will appear showing the top features and their contributions to model variance

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FWkwcTOfnLrDMCIaMY3FA%2FFF_%20Phase%205_Exploration_Variable%20Importance.png?alt=media&#x26;token=76a0d430-93ad-4175-a0a3-57bd2d060898" alt=""><figcaption></figcaption></figure>

3. List the top predictors for your model
   1. In this example, the top predictors, as shown in the bar graph below, are:
      1. `h3_hai_v0_gmt`
      2. `hmnp_v0_cd4_ifng`
      3. `z_score_continuous`
      4. `h1_v0_cd4_ifng`

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FF1uB7a1VURXL8Cnb2XXR%2FFF_%20Phase%205_Exploration_Variable%20Importance%20Plot_white%20background.png?alt=media&#x26;token=225a2ec0-6567-480d-8546-c51a5e2456a3" alt=""><figcaption></figcaption></figure>

4. Locate the **Features across dataset** sub-tab
5. Select the top features you had listed in part 8, and click the **redraw plot** button

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2Fv25PaMERr0yOlJEhgMGH%2FFF_%20Phase%205_Exploration_Features%20Across%20Dataset%20Config.png?alt=media&#x26;token=600037d4-6a7b-4d79-a453-8ca6f1391b8a" alt=""><figcaption></figcaption></figure>

6. Examine the **dot plots** to visualize how the top predictive features vary between responder outcomes
   1. The dot plot below is based on features from step 3.a

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FxQXBIy1FZlMrcaordXqB%2FFF_%20Phase%205_Exploration_Features%20Across%20Dataset%20Plot.png?alt=media&#x26;token=0b291037-cef4-4c00-93f5-590eee0840fa" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>4. Interpret the model - Explainable AI (xAI)</summary>

1. Navigate to the **Model Interpretation** tab
2. Utilize the various analysis tools to understand how features in the model influence predictions.
   1. Example (Heatmap): Helps the user understand how joint variations of two variables may influence predictions
      1. In **Vars**, select 2 features of interest like `h3_hai_v0_gmt` & `hmnp_v0_cd4_ifng`
      2. Select `Heatmap` from the **Analysis** options
      3. Click the **Plot Image** button

<figure><img src="https://1845146574-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZMrkCA3Bqd62Gp0kAk79%2Fuploads%2FACtnQmuqbB6peKny6GEi%2FFF_%20Phase%205_Exploration_Model%20Interpretation_Heatmap.png?alt=media&#x26;token=b2c934ea-69be-4b66-b9c8-e9cf8e0245c1" alt=""><figcaption></figcaption></figure>

</details>

You've now assessed model performance using AUC scores, ROC curves, and summary statistics, followed by deeper exploration of variable importance and feature-level patterns. By selecting top predictors and visualizing their variation across outcome groups, you've gained insight into how specific biological variables drove your model's decisions.
