Commit e0eb98c6 authored by SimonGlomb's avatar SimonGlomb
Browse files

fix merge failure

parent d2995568
......@@ -342,7 +342,6 @@ def distance_matrix(df, weights):
single_column_df = df[columns[i]]
matrix = matrix + calc_distance(single_column_df, i, n, weights)
print('weight-sum:' + str(sum(weights)))
return matrix / sum(weights)
......@@ -361,13 +360,12 @@ def calc_distance(df, weight_index, n, weights):
distance_func = lev
for j in range(n):
first_elem = npm[j]
for k in range(j+1,n):
matrix[j, k] = distance_func(first_elem, npm[k])
first_elem = npm[j]
for k in range(j+1,n):
matrix[j, k] = distance_func(first_elem, npm[k])
matrix = matrix + matrix.T
matrix = matrix / matrix.max()
print('current weight: ' + str(weights[weight_index]))
return matrix * weights[weight_index]
......@@ -390,6 +388,7 @@ def ocel_get_object_distances_sy(ocel, object_type, weights_per_attribute) -> di
cflow_list = find_cflow(relations_df, activity_dict)
# Sorts data frame and appends corresponding control flow
oid_filtered = oid_filtered.loc[oid_filtered['ocel:oid'] != '']
oid_filtered.sort_values(by=['ocel:oid'], ascending=[True], inplace=True)
oid_filtered = oid_filtered.assign(cflow=cflow_list)
......@@ -424,4 +423,4 @@ def ocel_get_object_distances_sy(ocel, object_type, weights_per_attribute) -> di
# #
# End of stanislav's implementation #
#################################################################
\ No newline at end of file
#################################################################
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