statnetWeb icon indicating copy to clipboard operation
statnetWeb copied to clipboard

ecoli1 and 2 networks generate errors

Open martinamorris opened this issue 6 years ago • 13 comments

Error in solve.default(A, tol = tol) : system is computationally singular: reciprocal condition number = 1.7338e-21

Can others please try pulling to make sure you're working with the same version, and reproduce this. The error shows up on the console when you load the network from the Data tab

martinamorris avatar Jun 15 '19 20:06 martinamorris

I'm getting this as well. Not sure why solve is being called at all, when just loading the network data...

chad-klumb avatar Jun 15 '19 21:06 chad-klumb

is it possible there is some anticipatory preprocessing (like the network plot?)

martinamorris avatar Jun 15 '19 21:06 martinamorris

Yeah I tried plotting them in the R console with just ergm loaded and didn't get this error.

chad-klumb avatar Jun 15 '19 21:06 chad-klumb

Possibly not a statnetWeb issue: calling infocent from sna yields

> infocent(ecoli1)
Error in solve.default(A, tol = tol) : 
  system is computationally singular: reciprocal condition number = 1.7338e-21

and infocent is called at various points in server.R

chad-klumb avatar Jun 15 '19 21:06 chad-klumb

We could try suppressing the error message in statnetWeb, although I'm not completely sure what the results are supposed to be used for at this point.

chad-klumb avatar Jun 15 '19 21:06 chad-klumb

nice catch.

not sure why we didn't see this error before.

i think the right solution is a modification in sna to catch and return the error message to avoid this result.

@CarterButts, would you be willing to add sna to the statnet org GH repos so we can address issues like these?

martinamorris avatar Jun 15 '19 22:06 martinamorris

i think the temp solution for statnetWeb is to not load the ecoli datasets into the built-in list.

@chad-klumb i know one place this is done is the top of server.R but i don't know if there are any other places that assume or reference these data. can you check, and see if commenting out the ecoli load gets us what we need?

martinamorris avatar Jun 15 '19 22:06 martinamorris

also appears in ui.R

I will try removing those and see what happens

chad-klumb avatar Jun 15 '19 22:06 chad-klumb

Chad, not sure if you're working on this but I went ahead and implemented the change (it's pushed up). In ui.R you can comment out ecoli1-2, and the app will no longer show those 2 datasets as options.

I also changed a broken hyperlink for the "List of common ergmterms".

Here are the changes: https://github.com/statnet/statnetWeb/commit/8b08d5261165bdd120cd17ed3cef424d09a97dc4#diff-dfdb0639caead1513ebded38db1c4f0bR220

skhan890 avatar Jun 15 '19 23:06 skhan890

Yes, I was testing everything again, but if you've already made the changes, that's fine.

I also commented out ecoli occurrences in server.R (although those aren't directly visible to the end user).

chad-klumb avatar Jun 15 '19 23:06 chad-klumb

Yes, I was testing everything again, but if you've already made the changes, that's fine.

I also commented out ecoli occurrences in server.R (although those aren't directly visible to the end user).

I think it would be good to be consistent across the files.

martinamorris avatar Jun 15 '19 23:06 martinamorris

Done! https://github.com/statnet/statnetWeb/commit/72e8f3b93ee34dfd31c652bd9c48ac0f8738c153

skhan890 avatar Jun 15 '19 23:06 skhan890

Ok, this is fixed for statnetWeb, but with a less-than-optimal solution. Since sna is not on GitHub, I can't file an issue for this, so will leave it open until @CarterButts weighs in.

martinamorris avatar Jun 16 '19 01:06 martinamorris