You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a code to alignments.py, to get the best alignment the alignment matrix doesn't work, but it doesn't work for me, I don't know if it finds the error and could you help me with it?
def get_best_alignment(alignment_matrix):
n_nodes = alignment_matrix.shape[0]
result = []
if not sp.issparse(alignment_matrix):
sorted_indices = np.argsort(alignment_matrix)
for node_index in range(n_nodes):
target_alignment = node_index #default: assume identity mapping, and the node should be aligned to itself
if sp.issparse(alignment_matrix):
row, possible_alignments, possible_values = sp.find(alignment_matrix[node_index])
node_sorted_indices = possible_alignments[possible_values.argsort()]
else:
node_sorted_indices = sorted_indices[node_index]
result.append([target_alignment, node_sorted_indices[-1:][0]])
return result
The idea is that of a result type [A -> B...].
The text was updated successfully, but these errors were encountered:
I'm trying to add a code to alignments.py, to get the best alignment the alignment matrix doesn't work, but it doesn't work for me, I don't know if it finds the error and could you help me with it?
The idea is that of a result type [A -> B...].
The text was updated successfully, but these errors were encountered: