Closed bfabiandev closed 3 years ago
Hi @bfabiandev, thanks for your interest and query.
For the first part, yes. The idea is to use k smallest non-trivial eigenvectors.
For the second question, there can be outputs with complex eigenvectors, such as in this case of a random graph:
Ps. Code snippet at this link. Vijay
Hi,
Neat work! I was looking at the implementation of the laplacian encoding, and some things weren't clear.
Why do you drop the first eigenvector in the last line (i.e. why do you run use indexes
1:pos_enc_dim+1
)? Does this come from the assumption that the first eigenvalue will be very close to 0?Another quick Q, could you explain why you need to use
np.real
in the line below? Are there any cases when we would have complex numbers here?Thanks in advance!