Jan Mühlnikel commited on
Commit
ffce09a
·
1 Parent(s): 1a3e36f

experiment

Browse files
Files changed (1) hide show
  1. functions/calc_matches.py +5 -2
functions/calc_matches.py CHANGED
@@ -50,6 +50,9 @@ def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
50
  filtered_df_indices = filtered_df.index.to_list()
51
  project_df_indices = project_df.index.to_list()
52
 
 
 
 
53
  # Select submatrix based on indices from both dataframes
54
  match_matrix = similarity_matrix[filtered_df_indices, :][:, project_df_indices]
55
 
@@ -69,11 +72,11 @@ def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
69
 
70
  # Create resulting dataframes with top matches and their similarity scores
71
  st.write(top_indices)
72
- p1_df = project_df.loc[top_indices[0]].copy()
73
  p1_df['similarity'] = top_values
74
 
75
  st.dataframe(p1_df)
76
- p2_df = filtered_df.loc[top_indices[1]].copy()
77
  p2_df['similarity'] = top_values
78
  st.dataframe(p2_df)
79
  print("finished calc matches")
 
50
  filtered_df_indices = filtered_df.index.to_list()
51
  project_df_indices = project_df.index.to_list()
52
 
53
+ st.write(filtered_df_indices)
54
+ st.write(project_df_indices)
55
+
56
  # Select submatrix based on indices from both dataframes
57
  match_matrix = similarity_matrix[filtered_df_indices, :][:, project_df_indices]
58
 
 
72
 
73
  # Create resulting dataframes with top matches and their similarity scores
74
  st.write(top_indices)
75
+ p1_df = filtered_df.loc[top_indices[0]].copy()
76
  p1_df['similarity'] = top_values
77
 
78
  st.dataframe(p1_df)
79
+ p2_df = project_df.loc[top_indices[1]].copy()
80
  p2_df['similarity'] = top_values
81
  st.dataframe(p2_df)
82
  print("finished calc matches")