Skip to content

Fix for incorrect calculation of betweenness in addNodeSize()#10

Merged
iankloo merged 2 commits into
iankloo:developmentfrom
aj2duncan:sigmaAttrs
May 1, 2018
Merged

Fix for incorrect calculation of betweenness in addNodeSize()#10
iankloo merged 2 commits into
iankloo:developmentfrom
aj2duncan:sigmaAttrs

Conversation

@aj2duncan

Copy link
Copy Markdown
Contributor

What my pull fixes (if applicable)

When tmp_graph is created in addNodeSize(), the default it to create a directed graph, this will change the values of some of the calculated metrics.

What my pull improves (if applicable)

Adding directed = FALSE so the previous and I think expected behaviour returns.

Confirmation that you have tested your code

library(sigmaNet)
library(igraph)
#create a graph
sig = sigmaFromIgraph(lesMis)

# what the default values should be
betweenness(lesMis)
# values currently used by addNodeSize()
betweenness(graph_from_data_frame(sig$x$graph$edges))
# putting directed = FALSE in gets back to what I think the expected result should be
betweenness(graph_from_data_frame(sig$x$graph$edges, directed = FALSE))

I don't know if you're planning on dealing with directed networks (or give users the option to) but I hope this helps.

@aj2duncan
aj2duncan changed the base branch from master to development May 1, 2018 07:57
@aj2duncan aj2duncan changed the title Sigma attrs Fix for incorrect calculation of betweenness in addNodeSize() May 1, 2018
@iankloo
iankloo merged commit 1643d3d into iankloo:development May 1, 2018
@iankloo iankloo mentioned this pull request May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants