Description Usage Arguments Value Author(s) Examples
A utility function for easily applying various methods of thresholding to graphs.
1 | fmriu.thresh_graphs(graphs, method = NaN, t = 0.5, binarize = FALSE)
|
graphs: |
[[n]][nroi, nroi] graphs to threshold. |
method=NaN: |
the method to use for thresholding the graphs.
|
t=0.5: |
the threshold to use for the thresholding method selected. Behavior depends on the method above chosen:
|
binarize='FALSE': |
whether to binarize the graphs after the thresholding has been applied.
|
tgraphs: [[n]][nroi, nroi] the thresholded graphs.
Eric Bridgeford
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | graphs <- list()
graphs[[1]] <- matrix(runif(25), nrow=5, ncol=5)
graphs[[2]] <- matrix(runif(25), nrow=5, ncol=5)
graphs[[3]] <- matrix(runif(25), nrow=5, ncol=5)
# I want to binarize my graphs without applying any thresholding
# setting all edges nonzero to connected (1) and zero edges to disconnected (0).
fmriu.thresh_graphs(graphs, binarize=TRUE)
# For each graph, I want to threshold the botton 70% of edges
# and then binarize such that the bottom 70% of edges are disconnected (0)
# and the top 30% of edges are connected (1).
fmriu.thresh_graphs(graphs, method='ptile', t=0.7, binarize=TRUE)
# For each graph, remove all edges less than 0.5.
fmriu.thresh_graphs(graphs, method='cutoff', t=0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.