| compare | R Documentation |
Various distances, measures of dissimilarity and similarity, correlations and other metrics are computed to compare the models. Optionally, the weight matrices of the models can be scaled before comparison. The resulting object can be used to produce heatmap plots and scatterplots to further illustrate the differences.
compare(x, ...)
## S3 method for class 'tna'
compare(x, y, scaling = "none", ...)
## S3 method for class 'matrix'
compare(x, y, scaling = "none", ...)
x |
A |
... |
Ignored. |
y |
A |
scaling |
A
|
A tna_comparison object, which is a list containing the
following elements:
matrices: A list containing the scaled matrices of the input tna
objects or the scaled inputs themselves in the case of matrices.
difference_matrix: A matrix of differences x - y.
edge_metrics: A data.frame of edge-level metrics about the differences.
summary_metrics: A data.frame of summary metrics of the differences
across all edges.
network_metrics: A data.frame of network metrics for both x and y.
centrality_differences: A data.frame of differences in centrality
measures computes from x and y.
centrality_correlations: A numeric vector of correlations of the
centrality measures between x and y.
Model comparison functions
compare.group_tna(),
compare_sequences(),
plot.tna_comparison(),
plot.tna_sequence_comparison(),
plot_compare(),
plot_compare.group_tna(),
print.tna_comparison(),
print.tna_sequence_comparison()
# Comparing TNA models
model_x <- tna(group_regulation[1:200, ])
model_y <- tna(group_regulation[1001:1200, ])
comp1 <- compare(model_x, model_y)
# Comparing matrices
mat_x <- model_x$weights
mat_y <- model_y$weights
comp2 <- compare(mat_x, mat_y)
# Comparing a matrix to a TNA model
comp3 <- compare(mat_x, model_y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.