compare {tna} | R Documentation |
Compare Two Matrices or TNA Models with Comprehensive Metrics
Description
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.
Usage
compare(x, ...)
## S3 method for class 'tna'
compare(x, y, scaling = "none", ...)
## S3 method for class 'matrix'
compare(x, y, scaling = "none", ...)
Arguments
x |
A |
... |
Ignored. |
y |
A |
scaling |
A
|
Value
A tna_comparison
object, which is a list
containing the
following elements:
-
matrices
: Alist
containing the scaled matrices of the inputtna
objects or the scaled inputs themselves in the case of matrices. -
difference_matrix
: Amatrix
of differencesx - y
. -
edge_metrics
: Adata.frame
of edge-level metrics about the differences. -
summary_metrics
: Adata.frame
of summary metrics of the differences across all edges. -
network_metrics
: Adata.frame
of network metrics for bothx
andy
. -
centrality_differences
: Adata.frame
of differences in centrality measures computes fromx
andy
. -
centrality_correlations
: Anumeric
vector of correlations of the centrality measures betweenx
andy
.
See Also
Model comparison functions
compare.group_tna()
,
plot.tna_comparison()
,
plot_compare()
,
plot_compare.group_tna()
,
print.tna_comparison()
Examples
# 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)