Closed itmfl closed 10 years ago
You mean that you want to rewrite it, or that I should rewrite it?
At first I was hoping that you will rewrite it as I believe the relevant part of the code that needs to be modified is the C code in the dotproduct.c and I am not too familiar with those. However, looking at the source code for that function it seems like all I need to do is to swap nrow and ncol at several places so I will try to go ahead and change it myself. Thanks.
I don't really want to change this to be honest, because imo having the vectors in columns is natural, and it is also faster. It is does not match another function, that is unfortunate, but you cannot have everything. The other function's encoding is also natural imo. Just transpose the matrix before feeding it into dot.product.game
.
But if you change it, that is fine with me, but please do a better job than last time. In particular:
If you have a question about something in the C code then please ask, and I'll help.
There is a slight inconsistency between the input to dot.product.game and the output of adjacency.spectral.embedding functions.
The input to dot.product.game assume that the columns correspond to the vectors. That is, n latent positions in d dimension, when input to dot.product.game, should be in a form as a dxn matrix.
On the other hand, the output of adjacency.spectral.embedding of a graph on n vertices into d dimension is returned as a nxd matrix.
I think that for consistency, the input to dot.product.game should also be a nxd matrix.