Jan Mühlnikel
commited on
Commit
·
da4441d
1
Parent(s):
a46e9cf
experiment
Browse files
functions/calc_matches.py
CHANGED
@@ -66,16 +66,16 @@ def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
|
66 |
# Get the values corresponding to the top k indices
|
67 |
#top_values = match_matrix[row_indices, col_indices]
|
68 |
|
69 |
-
top_filtered_df_indices = [filtered_df_index_map[i] for i in top_col_indices]
|
70 |
-
top_project_df_indices = [project_df_index_map[i] for i in top_row_indices]
|
71 |
|
72 |
st.write(top_filtered_df_indices)
|
73 |
|
74 |
# Create resulting dataframes with top matches and their similarity scores
|
75 |
-
p1_df = filtered_df.loc[
|
76 |
p1_df['similarity'] = top_values
|
77 |
|
78 |
-
p2_df = project_df.loc[
|
79 |
p2_df['similarity'] = top_values
|
80 |
print("finished calc matches")
|
81 |
|
|
|
66 |
# Get the values corresponding to the top k indices
|
67 |
#top_values = match_matrix[row_indices, col_indices]
|
68 |
|
69 |
+
#top_filtered_df_indices = [filtered_df_index_map[i] for i in top_col_indices]
|
70 |
+
#top_project_df_indices = [project_df_index_map[i] for i in top_row_indices]
|
71 |
|
72 |
st.write(top_filtered_df_indices)
|
73 |
|
74 |
# Create resulting dataframes with top matches and their similarity scores
|
75 |
+
p1_df = filtered_df.loc[top_col_indices].copy()
|
76 |
p1_df['similarity'] = top_values
|
77 |
|
78 |
+
p2_df = project_df.loc[top_row_indices].copy()
|
79 |
p2_df['similarity'] = top_values
|
80 |
print("finished calc matches")
|
81 |
|