Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reordering matrix in bLP #2

Open
stouffer opened this issue Jul 28, 2014 · 1 comment
Open

Reordering matrix in bLP #2

stouffer opened this issue Jul 28, 2014 · 1 comment

Comments

@stouffer
Copy link
Contributor

Is it necessary to reorder the adjacency matrix like in the third line of the function bLP (i.e., x <- x[sample(c(1:NROW(x))),sample(c(1:NCOL(x)))]) or at all?

I already get classic cannot allocate vector of size errors at that stage with large-ish datasets.

@tpoisot
Copy link
Member

tpoisot commented Jul 28, 2014

That's a good question. I think it is because Liu & Murata have a paragraph on the paper about random order for LP to avoid resonance/priority effect, which is most likely why I added this line (but I wrote that in early 2011, so I can't guarantee anything about my motivations).

Let me push some code that would (perhaps) allow to keep this in place.

tpoisot pushed a commit that referenced this issue Jul 28, 2014
1. If memory is an issue (see #2), then sparse matrices should be better. I
tested with a 100x100 matrix with 100 ones.

2. I replaced snow/snowfall by doMC and plyr. This will make it easier
to run the analysis on clusters. There is an example at the end.
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

No branches or pull requests

2 participants