Skip to content

Commit

Permalink
Merge pull request #702 from open-AIMS/fix-outcome_map-bug-in-slice-l…
Browse files Browse the repository at this point in the history
…abels

Fix error in bin size for `sensitivity.outcome_map`
  • Loading branch information
ConnectedSystems authored Sep 6, 2024
2 parents 32820a7 + 37bc954 commit f19656b
Show file tree
Hide file tree
Showing 5 changed files with 605 additions and 226 deletions.
16 changes: 10 additions & 6 deletions docs/src/usage/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ save("tsa.png", tsa_fig)

![Plots of Temporal Sensitivities](../assets/imgs/analysis/tsa.png)


### Convergence Analysis

When undertaking sensitivity analysis it is important to have a sufficient number of samples
Expand Down Expand Up @@ -437,14 +436,17 @@ in identifying which (group of) factors drive model outputs and their active are
factor space.

```julia
mean_s_tac = dropdims(mean(s_tac), dims=1)

tac_rs = ADRIA.sensitivity.rsa(rs, mean_s_tac; S=10)
rsa_fig = ADRIA.viz.rsa(
rs,
tac_rs,
["dhw_scenario", "wave_scenario", "N_seed_TA", "N_seed_CA", "fogging", "SRM"];
[:dhw_scenario, :wave_scenario, :N_seed_TA, :N_seed_CA, :fogging, :SRM];
opts,
fig_opts
)

save("rsa.png", rsa_fig)
```

Expand All @@ -458,24 +460,26 @@ As the name implies, outcome mapping aids in identifying the relationship betwee
outputs and the region of factor space that led to those outputs.

```julia
mean_s_tac = dropdims(mean(s_tac), dims=1)

tf = Figure(size=(1600, 1200)) # size of figure

# Indicate factor values that are in the top 50 percentile
tac_om_50 = ADRIA.sensitivity.outcome_map(rs, mean_s_tac, x -> any(x .>= 0.5), foi; S=20)
tac_top_50 = ADRIA.sensitivity.outcome_map(rs, mean_s_tac, x -> any(x .>= 0.5), foi; S=20)
ADRIA.viz.outcome_map!(
tf[1, 1],
rs,
tac_om_50,
tac_top_50,
foi;
axis_opts=Dict(:title => "Regions which lead to Top 50th Percentile Outcomes", :ylabel => "TAC [m²]")
)

# Indicate factor values that are in the top 30 percentile
tac_om_70 = ADRIA.sensitivity.outcome_map(rs, mean_s_tac, x -> any(x .>= 0.7), foi; S=20)
tac_top_30 = ADRIA.sensitivity.outcome_map(rs, mean_s_tac, x -> any(x .>= 0.7), foi; S=20)
ADRIA.viz.outcome_map!(
tf[2, 1],
rs,
tac_om_70,
tac_top_30,
foi;
axis_opts=Dict(:title => "Regions which lead to Top 30th Percentile Outcomes", :ylabel => "TAC [m²]"))

Expand Down
Loading

0 comments on commit f19656b

Please sign in to comment.