statnet / statnetWeb

A graphical user interface for network modeling with the 'statnet' software
GNU General Public License v3.0
29 stars 17 forks source link

ecoli1 and 2 networks generate errors #71

Open martinamorris opened 5 years ago

martinamorris commented 5 years ago

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

chad-klumb commented 5 years ago

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

martinamorris commented 5 years ago

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

chad-klumb commented 5 years ago

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

chad-klumb commented 5 years ago

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 commented 5 years ago

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.

martinamorris commented 5 years ago

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 commented 5 years ago

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?

chad-klumb commented 5 years ago

also appears in ui.R

I will try removing those and see what happens

skhan890 commented 5 years ago

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

chad-klumb commented 5 years ago

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).

martinamorris commented 5 years ago

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.

skhan890 commented 5 years ago

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

martinamorris commented 5 years ago

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.