-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add algorithm to compute the network coordinates #878
Conversation
rebase? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can neither approve nor deny this PR. I don't have the maths skills to read this.
I know it works when I give it an hermitian matrix, but I don't get what the matrix is in our use case.
FYI, I had to install bazel
on my archlinux to make XLA compile.
b = | ||
1..(matrix_size - 1) | ||
|> Enum.map(fn i -> | ||
excluded_first_row_tensor | ||
|> Nx.slice([i - 1, 0], [1, i]) | ||
|> Nx.power(2) | ||
|> Nx.sum() | ||
end) | ||
|> Nx.stack() | ||
|> Nx.sum() | ||
|> Nx.to_number() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may be worth it to precise that that the indexes start at 0 vs 1 in the formula
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, algorithm start indexes a 1, while programming language start indexes at 0. I guess this is a standard way of thinking.
dee78dc
to
d0af8e9
Compare
…oundation#878)" This reverts commit f17a993.
…oundation#878)" This reverts commit f17a993.
…oundation#878)" This reverts commit f17a993.
…hethic-foundation#878)"" This reverts commit 839f793.
…oundation#878)" This reverts commit f17a993.
…hethic-foundation#878)"" This reverts commit 839f793.
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #159
Type of change
How Has This Been Tested?
TODO: need to provide more way to tests (Awaiting response from @internet-zero)
Checklist: