Commit 0d4c8467 by Lennart Holzenkamp

### resolvin weird merge conflict

parents 68e6af5c d766efbc
 ... ... @@ -353,21 +353,27 @@ def calc_distance(df, weight_index, n, weights): matrix[k][j] = matrix[j][k] elif (isinstance(npm[0], float)): matrix_temp = np.empty([n], dtype=float) for j in range(n): matrix[j][j] = 0 first_elem = npm[j] for k in range(j+1,n): matrix[j][k] = abs(first_elem - npm[k]) matrix[k][j] = matrix[j][k] for k in range(j + 1, n): matrix_temp[k] = abs(first_elem - npm[k]) for m in range(j): matrix_temp[m] = matrix[m][j] matrix_temp[j] = 0 matrix[j] = matrix_temp matrix = matrix / matrix.max() else: matrix_temp = np.empty([n], dtype=float) for j in range(n): matrix[j][j] = 0 first_elem = npm[j] for k in range(j+1,n): matrix[j][k] = lev(first_elem, npm[k]) matrix[k][j] = matrix[j][k] for k in range(j + 1, n): matrix_temp[k] = lev(first_elem, npm[k]) for m in range(j): matrix_temp[m] = matrix[m][j] matrix_temp[j] = 0 matrix[j] = matrix_temp matrix = matrix / matrix.max() return matrix * weights[weight_index] ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment