Description Usage Arguments Value Examples
Given a Bayesian network structure, apply clustering to the data with the aim to find clusters of somas
1 | BN_clustering(bayesian_structure, data, clusters, initialization, verbose)
|
bayesian_structure |
a bn object from bnlearn package whose nodes are gaussians |
data |
the same dataset used to compute the bayesian_structure |
clusters |
array of values where each value indicates the number of clusters for that model |
initialization |
a natural number to initialize the algorithm. Use 0 to use kmeans initialization and any other positive number as a seed for a random initialization |
verbose |
show BIC scores for each model and the optimal number of clusters |
model_list is the list of parameters that best fit the data according to BIC criteria
1 2 3 | somas <- read.table(file.path(tempdir(),"somaReebParameters.csv"), sep = ";", header = T, row.names = 1)
bayesian_structure <- BN_structure_learning(path_to_csv = file.path(tempdir(),"somaReebParameters.csv"), nboots = 200, significant_arcs = 0.95)
fittest_model <- BN_clustering(bayesian_structure, data = somas, clusters = c(2, 3, 4), initialization = 2, T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.