-
Notifications
You must be signed in to change notification settings - Fork 3
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
random dot product graph generator? #14
Comments
A little bit more specifically? Input is a vector for each vertex, and a similarity function? |
that's correct, similarity function is just a dot-product. let n be the number of vertices, a work-around of this is to just sample each X_u from a dirichlet, which more than satisfies the above constraints. however, if one samples from the dirichlet, one can never get anything whose ||X_v|| = 1 - eps, unless the vector is 1-sparse. an alternative strategy is to sample vectors on the unit sphere. one can do this by just sampling from a multivariate gaussian, normalizing by its norm. then, just discard everything outside the non-negative orthant, and you get a set of vectors that satisfy the conditions (i imagine there are other ways). but, the "problem" with this is that you get nothing inside the unit ball, only vectors on the boundary. if i correctly understand, this gives us a degree corrected SBM, so it may be desirable in its own right, but it is not exactly what i'm requesting here. i'm sure you can easily imagine algorithms that do sample from the proper space, some kind of rejection sampler parameterized by a multivariate gaussian i assume would do the trick (basically, a truncated gaussian). i guess the efficiency of that would depend on the parameters of the gaussian, but probably that is ok? does that help/make sense? |
I personally prefer Gabor's suggestion where the input is a vector for each vertex (or a matrix of size n by d, n=#vertices). There are some advantages to combining sampling latent positions and the graph together in one function but it does sacrifice flexibility, I believe. |
oh, i see what you guys mean! for clarity, the input would then be a d-by-n matrix. what would happen if any element of X'X is >1 or <0?
i vote 1. i guess another desirable function would be to generate vectors that are On Mon, Dec 30, 2013 at 11:15 AM, Daniel Sussman
perhaps consider allowing the quest for eudaimonia to guide you |
Btw. if we distance function is general, then this is quadratic. If we can use some properties of the distance function (e.g. if it is a dot-product and the vectors are on the unit sphere), and the graph is sparse, then we can maybe do something quicker, but it is tricky. |
quicker sounds good, can you elaborate a bit? On Wed, Jan 1, 2014 at 2:32 PM, Gabor Csardi notifications@github.comwrote:
perhaps consider allowing the quest for eudaimonia to guide you |
What I mean is that if the function is opaque, you have no other choice but If you have a special case, like a dot product, that has some structure, This only makes sense if the graph is sparse, otherwise you have O(n^2) On Wed, Jan 1, 2014 at 3:33 PM, joshua vogelstein
|
OK, so I am ready to write the functions to sample the vectors, and then we'll see if the dot-product generation itself can be made faster than O(n^2). So, what kind of sampler do we want? |
well, i guess a couple easy ones might be:
slightly harder:
i'm not sure if others have better suggestions, or a good prioritization of the above. |
OK, 1-3 are done, please reopen this issue if you have a more complete description of 4. |
awesome, thanks! On Mon, Jan 27, 2014 at 3:55 PM, Gabor Csardi notifications@github.comwrote:
perhaps consider allowing the quest for eudaimonia to guide you |
i didn't see one in there.
there are obviously many ways to implement such a thing, i certainly do not know the best, and we often write papers in which we generate them, presumably, everybody using a different method.
perhaps we should have a reference RDPG generator?
The text was updated successfully, but these errors were encountered: