Description Usage Arguments Value Author(s) Examples
View source: R/Refinement_final.R
Based on a GroupBN, a cluster can be selected manually, that is split and the refined model is learned.
1 2  | groupbn_refine_manually(res, hierarchy, refine, arc.thresh=NULL,
R=100, debug=FALSE, seed=NULL)
 | 
res | 
 an object of class groupbn  | 
hierarchy | 
 a cluster object from ClustOfVar  | 
refine | 
 name of group to be refined  | 
arc.thresh | 
 threshold for bootstrap arcs  | 
R | 
 number of bootstrap replicates for model averaging, default is 100  | 
debug | 
 a boolean, if TRUE, debugging messages are printed  | 
seed | 
 a random seed number  | 
returns an object of class groupbn
Ann-Kristin Becker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  | #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)
#Refine cluster 2
wine.groupbn.refined<-groupbn_refine_manually(wine.groupbn, hierarchy,
refine = "cl2", 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.