Skip to content

Commit

Permalink
Add DEA example to analysis.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosejoycrocker committed Oct 28, 2024
1 parent 13434c9 commit 3a7fad1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Binary file added docs/src/assets/imgs/analysis/example_dea_fig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions docs/src/usage/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,40 @@ save("outcome_map.png", tf)

![Outcome mapping](../assets/imgs/analysis/outcome_map.png)

### Data Envelopment Analysis

Performs output-oriented (default, input-oriented can also be applied) Data Envelopment Analysis (DEA)
given inputs X and output metrics Y. DEA is used to measure the performance of entities (scenarios),
where inputs are converted to outputs via some process. Each scenario's "efficiency score" is calculated
relative to an "efficiency fromtier", a region representing scenarios for which outputs cannot be further
increased by changing inputs (scenario settings).

```julia
dom = ADRIA.load_domain("path to domain", "45")

scens = ADRIA.sample(dom, 128)
rs = ADRIA.run_scenarios(dom, scens, "45")

n_scens = size(scens,1)

# Get cost of deploying corals in each scenario, with user-specified function
cost = cost_function(scens)

# Get mean coral cover and shelter volume for each scenario
s_tac = dropdims(
mean(ADRIA.metrics.scenario_total_cover(rs); dims=:timesteps); dims=:timesteps
)
s_sv = dropdims(
mean(ADRIA.metrics.scenario_shelter_volume(rs); dims=:timesteps); dims=:timesteps
)

# Do output oriented DEA analysis seeking to maximise cover and shelter volume for minimum
# deployment cost.
DEA_scens = ADRIA.economics.data_envelopment_analysis(cost, s_tac, s_sv)
dea_fig = ADRIA.viz.data_envelopment_analysis(rs, DEA_scens)

![DEA](../assets/imgs/analysis/example_dea_fig.png)
```
### GUI for high-level exploration (prototype only!)

```julia
Expand Down

0 comments on commit 3a7fad1

Please sign in to comment.