Learn R Programming

nettools (version 1.0.1)

netSI: Network Stability Indicators

Description

Family NetSI of stability indicators for network inference methods. The function computes a suite of 4 stability indicators of data x based on network distances.

Usage

netSI(x,indicator="all", d='HIM', adj.method='cor', method="montecarlo", k=3, h=20, n.cores, save=FALSE, verbose=TRUE, ...)

Arguments

x
numerical matrix or data.frame to be used for network inference.
indicator
all (default) character string. Indicating all or one of the four indicators available. This must be on of the strings "S","SI", "Sw" or "Sd".
d
HIM (default), character string indicating the distance to be used for the stability computation in case of indicators S and SI.
adj.method
"cor" (default), optional character string giving one of the methods available for network inference. For details see mat2adj.
method
"montecarlo" (default), a string identifying the cross validation schema to be used for the stability computation. This must be one of the strings montecarlo (default), LOO for Leave One Out or kCV for k-fold Cross Validation.
k
3 (default) numeric value indicating the number of subset the data will be splitted in. In case method is set to montecarlo the 1-1/k samples are taken for the computation. In case cvlab is set to loo it should be set to 1, otherwise it will be automatically set to 1. In case cvlab is set to kCV h iteration are performed, each dividing the data into randomly chosen k groups
h
20 (default), numeric value indicates the number of iterations the montecarlo and kCV procedure should be repeated(cross validations).
n.cores
NULL (default), optional numeric value giving the number of cores to be used for parallel computation. The default behaviour try to asses the maximum number of available cores and set a parallel computation using the maximum number of cores - 1 for the computation.
save
FALSE (default), logical. Should adjacency matrices and indicator's raw value from resampling scheme be saved?
verbose
TRUE (default), logical. Print all the information about the computation. If FALSE messages will be suppressed.
...
Additional arguments to be passed to the downstream functions. Not all parameters are used by all functions. See function netdist and mat2adj.
sseed:
random number generation seed

Value

A list with the followind elements: If save=TRUE:
call
character. Function call
ADJlist
A list with the adjacency matrices computed in the resampling scheme.
S
The value of the global indicator "S"
SI
The value of the global internal indicator "SI"
Sw
The value of the edge weight stability indicator "Sw"
Sd
The value of the node stability indicator "Sd"
S_boot
A numerical vector with the value of the stability indicator S for each resampling.
SI_boot
A numerical vector with the value of the stability indicator SI for each combination of pairs within all the resampling.
Sw_boot
A numerical matrix. Each row contains the value of the weight of a particular edge on different resampling splits.
Sd_boot
A numerical matrix number_of_resampling X number_of_nodes. Each column contain the degree of a node on different resampling splits.
If save=FALSE elements call, ADJlist, ADJ, S_boot, SI_boot, Sw_boot and Sd_boot will not be provided. For S and SI the mean over the resampling splits is computed, instead for the element Sw and Sd the range/mean is computed over resamplings.

Details

This function computes a suite of 4 stability indicators. It is based on network inference method function mat2adj and network distance function netdist. Parameters passed through ... will be used by the low-level functions mat2adj and netdist.

Indicators:

  • S: is the global stability indicator. It asses the pertubations of the network given by the resampling: in particular it account for the distance between the network inferred using all samples and the network inferred on a subsampling.
  • SI: is the local stability indicator. It provides a measure of the perturbations between different subsamplings. It computes the pairwise distances between networks inferred on different subsamplings.
  • Sw: is the edge stability indicator. It asses the stability of the edges inferred in different subsamplings. In case of a binary network it take into account only the presence/absence of the link, if a "weight" attribute is provided it asses the perturbation of the edge weight given the presence/absence on the given subsampling.
  • Sd: is the degree stability indicator. It asses the variations of the node degree given a subsampling perturbation on the data.

Parallel computation is provided automatically through the functions available in the parallel package included by default from R 2.15. Support for parallel computation is available only on multi-core machines not on high performace computing facility. If n.cores is set to NULL it searches for multiple cores on the machine, if it finds more than 2 cores the computation is parallelized using the maximum number of cores available - 1. If n.cores is a numeric value it checks if the number of cores provided is suitable for the machine where R is running. If the number of cores requested is bigger than the available cores n.cores will be set to NULL, otherwise the computation will be equally distributed on the number of cores provided. In case indicator is set to all or SI, parameter n.cores will pass to the low level function which compute the mutual distances, netdist.

References

M. Filosi, R. Visintainer, S. Riccadonna, G. Jurman, C. Furlanello (2014)Stability Indicators in Network Reconstruction, PLOSONE

See Also

netdist, mat2adj, WGCNA, minet

Examples

Run this code
myrawdata <- matrix(rnorm(200),ncol=20)

sstab <- netSI(myrawdata, d="HIM", n.cores=1, save=FALSE)
print(sstab$S)
print(sstab$SI)

Run the code above in your browser using DataLab