New idea to visualize the distribution of PSA sampled parameters

Aperta
#170 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
r

Direzione di ricerca

Start by checking how dampack currently exposes plotting and visualization features, then use the supplied R example with df_psa_random to understand the proposed grouping and density-ridge plots. Done would mean a documented way to visualize PSA sampled parameter distributions grouped as probabilities, utilities, costs, and other; the issue does not specify an entry point, tests, or expected interface.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

When the DARTH framework is uses, it would be nice to show the sampled distributions in an illustrative way.

Example to get started with. But we can improve this

Melt the dataset

df_melt <- melt(df_psa_random, variable.name = "Parameter")

Create a new column to classify parameters by prefix

df_melt <- df_melt %>%
mutate(Group = case_when(
str_starts(Parameter, "p_") ~ "Probabilities",
str_starts(Parameter, "u_") ~ "Utilities",
str_starts(Parameter, "c_") ~ "Costs",
TRUE ~ "Other"
))

Optionally check the groups

table(df_melt$Group)

df_probs <- df_melt %>% filter(Group == "Probabilities")

Probabilities:
ggplot(df_probs, aes(x = value, y = Parameter)) +
geom_density_ridges(scale = 1.5, rel_min_height = 0.01) +
theme_bw(base_size = 14) +
ggtitle("Probabilities")

df_utils <- df_melt %>% filter(Group == "Utilities")

ggplot(df_utils, aes(x = value, y = Parameter)) +
geom_density_ridges(scale = 1.5, rel_min_height = 0.01) +
theme_bw(base_size = 14) +
ggtitle("Utilities")

df_costs <- df_melt %>% filter(Group == "Costs")

ggplot(df_costs, aes(x = value, y = Parameter)) +
geom_density_ridges(scale = 1.5, rel_min_height = 0.01) +
theme_bw(base_size = 14) +
ggtitle("Costs")

df_other <- df_melt %>% filter(Group == "Other")

ggplot(df_other, aes(x = value, y = Parameter)) +
geom_density_ridges(scale = 1.5, rel_min_height = 0.01) +
theme_bw(base_size = 14) +
ggtitle("Other")

Lingua principale
R
Stelle
43
Fork
14
Merge medio
4h 44m
PR unite (30g)
15

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DARTH-git/dampack

Tutte le issue di DARTH-git/dampack

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.