I’m trying to figure out how to compute a similarity matrix using a Gaussian similarity score between every data point (row, that is) in an INDArray matrix.
In a for loop, that’d look something like this psuedocode:
sim_matrix[][]
for row_i in matrix:
for row_j in matrix:
if row_i != row_j:
sim_matrix[i][j] = score(row_i, row_j)
Is there anyway to use something like this to get that job done with ND4J:
Nd4j.getExecutioner().execAndReturn(SimilarityFunction.compute(simMatrix, simMatrix));
Thanks!