build.idgraph | R Documentation |
Constructs the ID-Graph (igraph/idgraph object) from mcfs_result
object returned by mcfs
function.
The number of top features included and the number of ID-Graph edges can be customized.
build.idgraph(mcfs_result,
size = NA,
size_ID = NA,
self_ID = FALSE,
outer_ID = FALSE,
orphan_nodes = FALSE,
size_ID_mult = 3,
size_ID_max = 100)
mcfs_result |
results returned by |
size |
number of top features to select. If |
size_ID |
number of interdependencies (edges in ID-Graph) to be included. If |
self_ID |
if |
outer_ID |
if |
orphan_nodes |
if |
size_ID_mult |
If |
size_ID_max |
maximum number of interactions to be included from ID-Graph (the upper limit). |
igraph/idgraph S3 object that can be: plotted in R, exported to graphML (XML format) or saved as csv or rds files.
## Not run: ###dontrunbegin
# create input data
adata <- artificial.data(rnd_features = 10)
showme(adata)
# Parametrize and run MCFS-ID procedure
result <- mcfs(class~., adata, cutoffPermutations = 0, featureFreq = 50,
buildID = TRUE, finalCV = FALSE, finalRuleset = FALSE,
threadsNumber = 2)
# build interdependencies graph for top 6 features
# and top 12 interdependencies and plot all nodes
gid <- build.idgraph(result, size = 6, size_ID = 12, orphan_nodes = TRUE)
plot(gid, label_dist = 1)
# Export graph to graphML (XML structure)
path <- tempdir()
igraph::write_graph(gid, file = file.path(path, "artificial.graphml"),
format = "graphml", prefixAttr = FALSE)
## End(Not run)###dontrunend
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.