-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsynthetic10.R
73 lines (51 loc) · 1.55 KB
/
synthetic10.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#####################
### Load packages ###
#####################
library(igraph)
library(combinat)
library(VGAM)
##################
### Parameters ###
##################
set.seed(1)
#################
### Functions ###
#################
source("functions.R")
######################
### Empirical Data ###
######################
# Load HuRI data
load("empirical10.RData")
gSynth10 <- dmc(n = gorder(gHuRI10),
qm = resultHuRI10[1],
qc = resultHuRI10[2])
# Run minUni
durationSynth10 <- proc.time()
resultSynth10 <- deconstruct(g = gSynth10[[1]],
method = "minUni",
returnUV = TRUE)
durationSynth10 <- proc.time() - durationSynth10
# STRING data
synthSTR <- list()
durationSynthSTR <- rep(x = NA,
times = length(gSTR))
resultSynthSTR <- list()
for(i in 1:length(gSTR)){
synthSTR[[i]] <- dmc(n = gorder(gSTR[[i]]),
qm = resultSTR[[i]][1],
qc = resultSTR[[i]][2])
durationSynthSTR[i] <- proc.time()[3]
resultSynthSTR[[i]] <- deconstruct(g = synthSTR[[i]][[1]],
method = "minUni",
returnUV = TRUE)
durationSynthSTR[i] <- proc.time()[3] - durationSynthSTR[i]
}
#############################
### Remove unwanted stuff ###
#############################
rm(list = lsf.str())
#################
### Save data ###
#################
save.image("synthetic10.RData")