SemNeT icon indicating copy to clipboard operation
SemNeT copied to clipboard

Community Network estimation removes too much due to `convert2igraph`

Open AlexChristensen opened this issue 8 months ago • 0 comments

To Reproduce:

  • Function error occurred in: CN

R and SemNeT versions:

  • R: 4.4.0
  • SemNeT: latest

Operating System:

  • OS: all
  • Version N/A

Additional context and comments convert2igraph.R is removing parts of the matrix that are 'unconnected', igraph is producing row/column indices that refer to that filtered matrix, but then CN.R is using those row/column indices to subset the original coocurrence matrix (adj). This leads to a mismatch in which nodes are reported as being the largest matrix. If you instead add your removal of unconnected nodes either to the start of the CN.R script or to the end, the problem is resolved.

AlexChristensen avatar Jun 28 '24 19:06 AlexChristensen