Skip to content

Commit

Permalink
Merge pull request #49 from DARPA-ASKEM/38-task-review-help-docs-for-…
Browse files Browse the repository at this point in the history
…validate-configuration-funman

38 task review help docs for validate configuration funman
  • Loading branch information
mecrouch authored Jan 23, 2025
2 parents 35957a3 + 6b345ba commit ed00488
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions docs/config-and-intervention/validate-model-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ The Validate configuration operator takes a model configuration and an optional

???+ tip

The input configuration should include some distribution on the parameters to allow for an exploration of the parameter space.
When [setting up the input configuration](configure-model.md#edit-or-create-a-model-configuration):

- Include some distribution on the parameters to allow for an exploration of the parameter space.
- For better results, you can set constant parameter values as distributions rather than point values. For example, instead of setting a parameter to `0`, set it to a Uniform distribution from `0` to `0`.

<figure markdown>
![](../img/config-and-intervention/validate/validate-configuration-operator.png)
Expand Down Expand Up @@ -77,6 +80,20 @@ Compartmental constraints provide a simple validation layer for your model confi

![](../img/config-and-intervention/validate/compartmental-constraints.png)

??? tip "Troubleshooting the compartmental constraint"

In cases where the compartmental constraint doesn't work properly, try defining it as a custom constraint:

1. Prompt the [Edit model](../modeling/edit-model.md#use-the-ai-assistant-to-edit-a-model) AI assistant to:

```{ .text .wrap }
Create an observable that is the sum of all compartments
```
2. Create a new [configuration](configure-model.md) for the edited model.
3. Add a custom constraint that **linearly constrains** the new observable above and below the total population.

<figure markdown>![](../img/config-and-intervention/validate/compartmental-constraint-custom.png)<figcaption markdown>Custom version (bottom) of the compartmental constraint (top) limiting the new observable above and below the total population.</figcaption></figure>

??? list "Turn the compartmental constraints on or off"

- Turn the **Active** toggle on or off.
Expand Down Expand Up @@ -217,7 +234,6 @@ State variable and observables plots provide a time-series view of how model var
- ![](../img/config-and-intervention/validate/observables.png)

</div>

??? list "Show or hide state variable or observable plots"

1. Click <span class="sr-only" id="expand-icon-label">Expand</span> :fontawesome-solid-angles-left:{ title="Expand" aria-labelledby="expand-icon-label" } to expand the Output settings.
Expand Down Expand Up @@ -255,4 +271,23 @@ Parameter plots allow you to explore how variations in model parameters influenc

When analyzing model behavior, intermediate results can sometimes make it hard to focus on the most comprehensive outcomes. You can instead display only the most extensive calculations performed for each combination of parameter values. This shows the final iteration where the model has computed the farthest timepoint necessary to ensure all checks either pass or fail.

- Click **Only show furthest results**.
- Click **Only show furthest results**.

## Troubleshooting

### Long run-times

If your validation is taking too long, try editing your constraints to run on a small number of timepoints, such as 0&ndash;5 days. This can help you find:

- Parameter ranges to drop. For example, if you have an infection rate of 0.1&ndash;0.9, you may notice during early validation that values above 0.8 result in immediate system instability. In this case, you can narrow the parameter range to 0.1&ndash;0.8.
- More required constraints. For example, if early validation results are unexpected or inconsistent, there may be missing constraints, such as one limiting initial values or ensuring consistency between parameters.

Resolving either of these cases can help you reduce the time required for the full validation.

### No satisfactory conditions

If the results contain no satisfactory conditions, it often means the entire parameter range is unsatisfactory. Try running validation again with a wider parameter ranges.

## Next steps

You can use the new validated configuration in [simulations](../simulation/simulate-model.md) to forecast, analyze, or explore system behavior based on the validated parameters. The validation eliminates the need to manually reconfigure or adjust inputs between these steps.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/config-and-intervention/validate/state-variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ed00488

Please sign in to comment.