Jan Mühlnikel commited on
Commit
8b7f97e
·
1 Parent(s): e79b235

experiment

Browse files
functions/calc_matches.py CHANGED
@@ -21,7 +21,7 @@ def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
21
  flat_matrix = dense_match_matrix.flatten()
22
 
23
  # Get the indices of the top 15 values in the flattened matrix
24
- top_15_indices = np.argsort(flat_matrix)[-top_x:][::-1]
25
 
26
  # Convert flat indices back to 2D indices
27
  top_15_2d_indices = np.unravel_index(top_15_indices, dense_match_matrix.shape)
 
21
  flat_matrix = dense_match_matrix.flatten()
22
 
23
  # Get the indices of the top 15 values in the flattened matrix
24
+ top_15_indices = np.argsort(flat_matrix)[:top_x][::-1]
25
 
26
  # Convert flat indices back to 2D indices
27
  top_15_2d_indices = np.unravel_index(top_15_indices, dense_match_matrix.shape)
modules/multimatch_result_table.py CHANGED
@@ -8,7 +8,7 @@ def show_multi_table(p1_df, p2_df):
8
  p2_df = p2_df.reset_index(drop=True)
9
 
10
  actual_ind = 0
11
- for i in range(len(p1_df) - 1, -1, 2): # stepsize because project matchs in both ways and it should only display a match one time
12
  actual_ind += 1
13
  match_df = pd.DataFrame()
14
  row_from_p1 = p1_df.iloc[[i]]
 
8
  p2_df = p2_df.reset_index(drop=True)
9
 
10
  actual_ind = 0
11
+ for i in range(len(p1_df) - 1, -1, -2): # stepsize because project matchs in both ways and it should only display a match one time
12
  actual_ind += 1
13
  match_df = pd.DataFrame()
14
  row_from_p1 = p1_df.iloc[[i]]