fit_configuration | R Documentation |
fit_configuration
fits a configuration to one or more group networks.
fit_configuration_set
selects configurations from a set that
best fit the given group networks.
fit_configuration(x, configuration, ...) ## Default S3 method: fit_configuration( x, configuration, group_index, group_size, weights, parallel = FALSE, ... ) ## S3 method for class 'list' fit_configuration(x, configuration, group_size, weights, parallel = FALSE, ...) ## S3 method for class 'igraph' fit_configuration(x, configuration, attrname, ...) ## S3 method for class 'network' fit_configuration(x, configuration, attrname, ...) fit_configuration_set(x, configuration_set, ...) ## Default S3 method: fit_configuration_set( x, configuration_set, ties.method = c("all", "first", "last", "random"), group_index, group_size, weights, parallel = FALSE, ... ) ## S3 method for class 'list' fit_configuration_set( x, configuration_set, ties.method = c("all", "first", "last", "random"), group_size, weights, parallel = FALSE, ... ) ## S3 method for class 'igraph' fit_configuration_set( x, configuration_set, ties.method = c("all", "first", "last", "random"), attrname, ... ) ## S3 method for class 'network' fit_configuration_set( x, configuration_set, ties.method = c("all", "first", "last", "random"), attrname, ... )
x |
A group network or list of group networks. A group network can be an adjacency
matrix, edge list, |
configuration |
A |
group_index |
Vector of unique identifiers for each group network in |
group_size |
Numeric vector of group size(s) when |
weights |
Numeric vector of edge weights when |
parallel |
Use parallel processing. Parallel processing can only be used when multiple group
networks are being fit. To explicitly set the number of cores used, pass the
number through |
attrname |
Attribute name that holds the edge weights (usually |
configuration_set |
A |
ties.method |
When |
fit_configuration
fits a single configuration to one or more group
networks. All group networks must be the same size as the configuration.
For fit_configuration_set
, group networks can be different sizes. The
function will only fit configurations in the set that are the same size as a
group network.
Fitting is done using a naive algorithm or using a linear program (LP) through
the ROI
package. The naive algorithm is written in C++ to improve
performance and often is faster than LP solvers. To use an LP solver, pass the
solver name and any solver parameters through ...
to the
ROI_solve
function (e.g., solver = "glpk"
). When parallel
processing, also pass the solver package name and the associated
ROI.plugin.*
package name through ...
using a "packages"
parameter (e.g., packages = c("Rglpk","ROI.plugin.glpk")
).
See SmallGroupNetwork
for details of how configurations are fit
to group networks.
fit_configuration
returns a configuration_fit
object.
For a given group network, the fit_configuration_set
returns a
configuration_fit_set
object with all configurations that best fit the
group network when ties.method = "all"
. Otherwise it returns a
configuration_fit
object.
default
: Fit configuration to group network(s) from
adjacency matrix or edge list
list
: Fit configuration to group networks from list of
networks
igraph
: Fit configuration to group network from
network
object
network
: Fit configuration to group network from
network
object
default
: Fit configuration set to group network(s) from
adjacency matrix or edge list
list
: Fit configuration set to group networks from list
of networks
igraph
: Fit configuration set to group network from
igraph
object
network
: Fit configuration set to group network from
network
object
configuration
, configuration_set
f <- star(4)[[1]] set.seed(102) x <- matrix(rnorm(16), 4) fit_configuration(x, f) f <- add_component(c(star(3, value = 2L),star(3))) el <- cbind(c(1,1,2,3), c(2,3,3,4)) w <- runif(4, 0, 3) fit_configuration(el, f, group_size = 6, weights = w) f_set <- c( star(4), subgroup_all(4, relation = "between"), subgroup(4), star(4:5), subgroup_all(4:5, relation = "between"), subgroup(4:5) ) set.seed(102) x <- list( matrix(rnorm(16), 4), matrix(rnorm(25), 5) ) fit_group_network(x, f_sets)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.