-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.R
47 lines (39 loc) · 1.03 KB
/
run.R
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
43
44
45
46
47
setup.client <- function() {
# Define parameters
username <- "node1-user"
password <- "node1-password"
host <- 'http://localhost:5000'
api_path <- '/api'
# Create the client
client <- vtg::Client$new(host, api_path=api_path)
client$authenticate(username, password)
return(client)
}
# Create a client
client <- setup.client()
# Get a list of available collaborations
print( client$getCollaborations() )
# Select a collaboration
client$setCollaborationId(1)
client$set.task.image(
'pmateus/tiber:2.0.0',
task.name="bayesian"
)
# Possibility to directly configure options, such as
# the number of bootstrap replicates.
config <- list(
arc_strength_args = list(
# algorithm = "hc",
R = 300
# algorithm.args = list(score = "bde", restart = 5, perturb = 5)
),
# weighted_strength = 0.3
val_org_id = c(),
# exclude = c('3')
# data_split = 0.6
# seed = 1234
)
# Run the bayesian network algorithm
client$use.master.container <- TRUE
client$data_format <- "RDS"
result <- client$call('bayesian', 'L', config)