Small world metric computation: sigma and omega

39 views
Skip to first unread message

Gershon Spitz

unread,
Aug 7, 2020, 12:22:19 AM8/7/20
to brainGr...@googlegroups.com
Dear Chris,

I am calculating small world sigma and omega indices for structural covariance networks. Using your guide, I compute these measures using the following:

#Generate N number of for each group and density
kNumRand <- 1e2
#Turn clustering on. Ie., create random graph that controll for degree distribution and clustering.
clustering <- T
#Output random graph to disk and combine into ALL sub-directory
outdir <- paste0('data/rand')
#Calculate the small world parameters, along with global graph measures
#Calculate normalised rich-club coefficients and associated p values
rand_vars <- analysis_random_graphs(g, kNumRand, savedir=outdir,
clustering=clustering)

#Extract normalised rich-club coefficients and p-values
rich.dt <- rand_vars$rich
rich.dt <- rich.dt[complete.cases(rich.dt)] # Remove rows w/ NA
#Extract small world parameters and related information
small.dt <- rand_vars$small
#Extract graph-level measures for the random graphs
rand.dt <- rand_vars$rand

#Control for clustering
kNumRandClust <- 1e2# Create 100 graphs per group/density combination
g.rand <- small.clust.dt <- vector('list', length=length(groups))
for (i in seq_along(groups)) {
g.rand[[i]] <- vector('list', length=length(densities))
for (j in seq_along(densities)) {
g.rand[[i]][[j]] <- sim.rand.graph.par(g[[i]][[j]],
kNumRandClust, clustering=T)
}
small.clust.dt[[i]] <- small.world(g[[i]], g.rand[[i]])
}
small.clust.dt <- rbindlist(small.clust.dt)

small.clust.dt[, Group := rep(groups, each=length(densities))]
setkey(small.dt, Group, density)
setkeyv(small.clust.dt, key(small.dt))
small.dt[, omega := small.dt[, Lp.rand / Lp] - small.clust.dt[, Cp / Cp.rand]]
small.dt[, Lp.latt := small.clust.dt$Lp.rand]
small.dt[, Cp.latt := small.clust.dt$Cp.rand]
small.tidy <- melt(small.dt, id.vars=c('density', 'Group', 'N’))


Here it the plot of these measures over density:




What you will notice is the omega for the red group (control group) is no bounded by 0 - 1, as is intended. Is there any reason why this could be happening?

I also attach a screenshot of the data table:


Let me know if any other information will make this easier to diagnose.

Kind regards,
G

Chris Watson

unread,
Aug 11, 2020, 6:55:26 PM8/11/20
to brainGr...@googlegroups.com
It looks like the clustering for the "lattice" networks is too low; you may have to increase the "max.iters" argument when creating the lattice networks.
Chris

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/028CCD55-118C-45FB-B254-1C6287BC6C1B%40monash.edu.

Gershon Spitz

unread,
Aug 12, 2020, 10:26:49 PM8/12/20
to brainGr...@googlegroups.com
Hi Chris,

Thanks. I’ve rerun with N=300 when creating the lattice networks, using the code below:

#Control for clustering
kNumRandClust <- 1e2# Create 100 graphs per group/density combination
g.rand <- small.clust.dt <- vector('list', length=length(groups))
for (i in seq_along(groups)) {
g.rand[[i]] <- vector('list', length=length(densities))
for (j in seq_along(densities)) {
g.rand[[i]][[j]] <- sim.rand.graph.par(g[[i]][[j]],
kNumRandClust, clustering=T, N = 300)
}
small.clust.dt[[i]] <- small.world(g[[i]], g.rand[[i]])
}
small.clust.dt <- rbindlist(small.clust.dt)


This still outputs the same result:




Any suggestions? I am using a 400 parcel, 7 network (lobe) Schaefer atlas.

Best,
Gershon.


<Screen Shot 2020-08-07 at 2.20.20 pm.png>


What you will notice is the omega for the red group (control group) is no bounded by 0 - 1, as is intended. Is there any reason why this could be happening?

I also attach a screenshot of the data table:

<Screen Shot 2020-08-07 at 2.21.36 pm.png>

Let me know if any other information will make this easier to diagnose.

Kind regards,
G

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/028CCD55-118C-45FB-B254-1C6287BC6C1B%40monash.edu.

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.

Chris Watson

unread,
Aug 13, 2020, 1:31:22 PM8/13/20
to brainGr...@googlegroups.com
As I said, you need to increase the "max.iters" argument, not "N". You may try increasing it to 150 or 200 first, but it may need to be higher. This will increase runtimes by a lot; it all depends on the structure of your graphs.
Chris

Reply all
Reply to author
Forward
0 new messages