Spaces:
Runtime error
Runtime error
doratiass
commited on
Commit
•
a43d6c3
1
Parent(s):
a35db5b
update syn plot
Browse files- dummy_df.csv +0 -0
- funcs.R +2 -2
dummy_df.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
funcs.R
CHANGED
@@ -3,7 +3,7 @@ library(sn)
|
|
3 |
library(readr)
|
4 |
|
5 |
prob_df <- read_csv("prob_df.csv",show_col_types = FALSE) %>%
|
6 |
-
mutate(model_prob = round(model_prob,
|
7 |
group_by(model_prob) %>%
|
8 |
summarise(cal_prob = mean(cal_prob))
|
9 |
|
@@ -81,7 +81,7 @@ syn_df <- function(dummy_df, df, model) {
|
|
81 |
generic_Oxycodone == 1 ~ "Oxycodone",
|
82 |
generic_Tramadol == 1 ~ "Tramadol",
|
83 |
TRUE ~ "Codeine"),
|
84 |
-
label = paste0(ifelse(gender_Male == 1, "Male", "Female"), ", Age ",RE_age,
|
85 |
"\nGeneric: ", generic,
|
86 |
"\nProbability ",round(prob,2),"%")
|
87 |
) %>%
|
|
|
3 |
library(readr)
|
4 |
|
5 |
prob_df <- read_csv("prob_df.csv",show_col_types = FALSE) %>%
|
6 |
+
mutate(model_prob = round(model_prob, 4)) %>%
|
7 |
group_by(model_prob) %>%
|
8 |
summarise(cal_prob = mean(cal_prob))
|
9 |
|
|
|
81 |
generic_Oxycodone == 1 ~ "Oxycodone",
|
82 |
generic_Tramadol == 1 ~ "Tramadol",
|
83 |
TRUE ~ "Codeine"),
|
84 |
+
label = paste0(ifelse(gender_Male == 1, "Male", "Female"), ", Age ",round(RE_age,1),
|
85 |
"\nGeneric: ", generic,
|
86 |
"\nProbability ",round(prob,2),"%")
|
87 |
) %>%
|