Description Usage Arguments Details Value Author(s) Examples
The function netinf.cv
perform a cross-validation loop and infers a gene network by combining priors and genomic data in each fold. This allows to estimate the predictive ability of the inferred network as well as edge stability.
1 | netinf.cv(data, categories, perturbations, priors, predn, priors.count = TRUE, priors.weight = 0.5, maxparents = 3, subset, method = c("regrnet", "bayesnet"), ensemble = FALSE, ensemble.maxnsol=3, predmodel = c("linear", "linear.penalized", "cpt"), nfold = 10, causal = TRUE, seed, bayesnet.maxcomplexity = 0, bayesnet.maxiter = 100, verbose = FALSE)
|
data |
matrix of continuous or categorical values (gene expressions for example); observations in rows, features in columns. |
categories |
if this parameter missing, 'data' should be already discretize; otherwise either a single integer or a vector of integers specifying the number of categories used to discretize each variable (data are then discretized using equal-frequency bins) or a list of cutoffs to use to discretize each of the variables in 'data' matrix. If method='bayesnet', this parameter should be specified by the user. |
perturbations |
matrix of 0, 1 specifying whether a gene has been perturbed (e.g., knockdown, overexpression) in some experiments. Dimensions should be the same than |
priors |
matrix of prior information available for gene-gene interaction (parents in rows, children in columns). Values may be probabilities or any other weights (citations count for instance). if priors counts are used the parameter |
predn |
indices or names of variables to fit during network inference. If missing, all the variables will be used for network inference. |
priors.count |
|
priors.weight |
real value in [0,1] specifying the weight to put on the priors (0=only the data are used, 1=only the priors are used to infer the topology of the network). |
maxparents |
maximum number of parents allowed for each gene. |
subset |
vector of indices to select only subset of the observations. |
method |
|
ensemble |
|
ensemble.maxnsol |
Number of equivalent solutions chosen at each step. |
predmodel |
type of predictive model to fit; |
nfold |
number of folds for the cross-validation. |
causal |
'TRUE' if the causality should be inferred from the data, 'FALSE' otherwise |
seed |
set the seed to make the cross-validation and network inference deterministic. |
bayesnet.maxcomplexity |
maximum complexity for bayesian network inference, see Details. |
bayesnet.maxiter |
maximum number of iterations for bayesian network inference, see Details. |
verbose |
|
bayesnet.maxcomplexity
and bayesnet.maxiter
are parameters to be passed to the network inference method (see cnSearchOrder and cnSearchSA from the catnet
package for more details).
method |
name of the method used for network inference. |
topology |
topology of the model inferred using the entire dataset. |
topology.coeff |
if method='regrnet' |
topology.cv |
topology of the networks inferred at each fold of the cross-validation. |
topology.coeff.cv |
if method='regrnet' |
prediction.score.cv |
list of prediction scores (R2, NRMSE, MCC) computed at each fold of the cross-validation. |
edge.stability |
stability of the edges inferred during cross-validation; only the stability of the edges present in the network inferred using the entire dataset is reported. |
edge.stability.cv |
stability of the edges inferred during cross-validation. |
edge.relevance |
mean relevance score for each across folds in cross-validation. |
edge.relevance.cv |
relevance score for each across computed during cross-validation. |
Benjamin Haibe-Kains, Catharina Olsen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ## load gene expression data for colon cancer data, list of genes related to RAS signaling pathway and the corresponding priors
data(expO.colon.ras)
## create matrix of perturbations (no perturbations in this dataset)
pert <- matrix(0, nrow=nrow(data.ras), ncol=ncol(data.ras), dimnames=dimnames(data.ras))
## number of genes to select for the analysis
genen <- 10
## select only the top genes
goi <- dimnames(annot.ras)[[1]][order(abs(log2(annot.ras[ ,"fold.change"])), decreasing=TRUE)[1:genen]]
mydata <- data.ras[ , goi, drop=FALSE]
myannot <- annot.ras[goi, , drop=FALSE]
mypriors <- priors.ras[goi, goi, drop=FALSE]
mydemo <- demo.ras
mypert <- pert[ , goi, drop=FALSE]
########################
## regression-based network inference
########################
## number of fold for cross-validation
res <- netinf.cv(data=mydata, categories=3, perturbations=mypert, priors=mypriors, priors.weight=0.5, method="regrnet", nfold=3, seed=54321)
## MCC for predictions in cross-validation
print(res$prediction.score.cv)
## export network as a 'gml' file that you can import into Cytoscape
## Not run: rr <- netinf2gml(object=res, file="predictionet_regrnet")
########################
## bayesian network inference
########################
## infer a bayesian network network from data and priors
## number of fold for cross-validation
## Not run: res <- netinf.cv(data=mydata, categories=3, perturbations=mypert, priors=mypriors, priors.count=TRUE, priors.weight=0.5, method="bayesnet", nfold=3, seed=54321)
## MCC for predictions in cross-validation
## Not run: print(res$prediction.score.cv)
## export network as a 'gml' file that you can import into Cytoscape
## Not run: rr <- netinf2gml(object=res, file="predictionet_bayesnet")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.