Jan Mühlnikel
commited on
Commit
·
aff9639
1
Parent(s):
3d9250a
experiment
Browse files
functions/calc_matches.py
CHANGED
|
@@ -54,20 +54,16 @@ def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
|
| 54 |
# Get the values corresponding to the top k indices
|
| 55 |
top_values = flat_data[top_indices]
|
| 56 |
|
| 57 |
-
|
| 58 |
-
#
|
| 59 |
-
top_values = match_matrix[row_indices, col_indices]
|
| 60 |
-
|
| 61 |
-
top_filtered_df_indices = [filtered_df_index_map[i] for i in col_indices]
|
| 62 |
-
top_project_df_indices = [project_df_index_map[i] for i in row_indices]
|
| 63 |
|
| 64 |
st.write(top_filtered_df_indices)
|
| 65 |
|
| 66 |
# Create resulting dataframes with top matches and their similarity scores
|
| 67 |
-
p1_df = filtered_df.loc[
|
| 68 |
p1_df['similarity'] = top_values
|
| 69 |
|
| 70 |
-
p2_df = project_df.loc[
|
| 71 |
p2_df['similarity'] = top_values
|
| 72 |
print("finished calc matches")
|
| 73 |
|
|
|
|
| 54 |
# Get the values corresponding to the top k indices
|
| 55 |
top_values = flat_data[top_indices]
|
| 56 |
|
| 57 |
+
#top_filtered_df_indices = [filtered_df_index_map[i] for i in col_indices]
|
| 58 |
+
#top_project_df_indices = [project_df_index_map[i] for i in row_indices]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
st.write(top_filtered_df_indices)
|
| 61 |
|
| 62 |
# Create resulting dataframes with top matches and their similarity scores
|
| 63 |
+
p1_df = filtered_df.loc[col_indices].copy()
|
| 64 |
p1_df['similarity'] = top_values
|
| 65 |
|
| 66 |
+
p2_df = project_df.loc[row_indices].copy()
|
| 67 |
p2_df['similarity'] = top_values
|
| 68 |
print("finished calc matches")
|
| 69 |
|