Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/Refinement_final.R
Adaptive Refinement of a group Bayesian Network using hierarchical Clustering
1 2 3 |
res |
an object of class groupbn |
hierarchy |
a cluster object from ClustOfVar |
refinement.part |
"mb", "mb2", "arc.confid" or "all", selects if the refinement steps should be done only within the markov blanket of the target variable (mb), within the second-order markov blanket (mb2), in all clusters with an arcconfidence to target >0 (arc.confid) or within all clusters (all). Default: "mb" |
restart |
a positive integer number, the number of restarts |
perturb |
a positive integer number, the number of perturbations (splits) in each restart |
max.step |
a positive integer number, the maximal number of refinement steps, default is 10 |
max.min |
a positive integer number, the maximal run time in minutes, default is unlimited |
R |
number of bootstrap replicates for model averaging, default is 100 |
return.all |
a boolean, if TRUE, the output is a whole list of group models, if FALSE, the output is only the best-scoring model. |
arc.thresh |
threshold for bootstrap arcs |
debug |
a boolean, if TRUE, debugging messages are printed |
seed |
a random seed number |
Based on a variable grouping, data are aggregated and a Bayesian network is learned. The target variable is kept separated during this procedure, so that the resulting network model can be used for risk prediction and classification. Starting from a coarse group network, groups are iteratively refined to smaller groups. The heuristic refinement happens downwards along the dendrogram, and stops, if it no longer improves the predictive performance of the model. The refinement part is implemented using a hill-climbing procedure.
returns an object of class groupbn
Ann-Kristin Becker
Becker A-K, Dörr M, Felix SB, Frost F, Grabe HJ, Lerch MM, et al. (2021) From heterogeneous healthcare data to disease-specific biomarker networks: A hierarchical Bayesian network approach. PLoS Comput Biol 17(2): e1008735. https://doi.org/10.1371/journal.pcbi.1008735
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #load example data
data(wine)
wine.test<-wine[wine$Soil%in%c("Reference", "Env1"),1:29]
wine.test$Soil<-factor(wine.test$Soil)
levels(wine.test$Soil)<-c("0", "1")
#cluster data
hierarchy<-hclustvar(X.quanti=wine.test[,3:29], X.quali=wine.test[,1:2])
#Learn group network among 5 clusters with "Soil" as target variable
wine.groupbn<-groupbn(hierarchy, k=5, target="Soil", separate=NULL,
X.quanti=wine.test[,3:29], X.quali=wine.test[,1:2], seed=321)
#Do one refinement step
#Set max.step higher to optimize completely
wine.groupbn.refined<-groupbn_refinement(wine.groupbn, hierarchy,
refinement.part="mb", max.step = 1, seed=321)
#Plot refined network
plot(wine.groupbn.refined)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.