-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemonstration_functions.R
More file actions
43 lines (37 loc) · 888 Bytes
/
demonstration_functions.R
File metadata and controls
43 lines (37 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
compboost = function (...)
{
Sys.sleep(1)
out = list("compboost")
class(out) = "compboost"
return (out)
}
generateCboostAppData = function (cboost, dir)
{
message("Generating app data into: ", dir, "\n")
pb <- txtProgressBar(min = 1, max = 100, style = 3)
for (i in seq_len(100)) {
Sys.sleep(0.02)
setTxtProgressBar(pb, i)
}
close(pb)
utils::browseURL("index.html")
}
plot.compboost = function (object, learner, at)
{
plot.data = read.csv(
file = paste0(
"plot_data/effects/",
stringr::str_replace_all(string = learner, pattern = " ", replacement = ""),
".csv"
)
)
var = strsplit(learner, " ")[[1]]
var = var[length(var)]
ggplot(data = plot.data, aes(x, y)) +
geom_line() +
theme_bw() +
labs(title = learner,
subtitle = paste0("Plottet at iteration ", at)) +
xlab(var) +
ylab("")
}