Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Jan Mühlnikel
commited on
Commit
·
29fd9ee
1
Parent(s):
1081227
redo matching method
Browse files
functions/calc_matches.py
CHANGED
@@ -2,6 +2,7 @@ import pandas as pd
|
|
2 |
import numpy as np
|
3 |
from scipy.sparse import csr_matrix, lil_matrix
|
4 |
|
|
|
5 |
def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
6 |
# matching project2 can be any project
|
7 |
# indecies (rows) = project1
|
@@ -32,8 +33,9 @@ def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
|
32 |
p2_df["similarity"] = top_values
|
33 |
|
34 |
return p1_df, p2_df
|
35 |
-
|
36 |
"""
|
|
|
|
|
37 |
def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
38 |
# Ensure the matrix is in a suitable format for manipulation
|
39 |
if not isinstance(similarity_matrix, csr_matrix):
|
@@ -73,5 +75,4 @@ def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
|
73 |
print("finished calc matches")
|
74 |
|
75 |
return p1_df, p2_df
|
76 |
-
"""
|
77 |
|
|
|
2 |
import numpy as np
|
3 |
from scipy.sparse import csr_matrix, lil_matrix
|
4 |
|
5 |
+
"""
|
6 |
def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
7 |
# matching project2 can be any project
|
8 |
# indecies (rows) = project1
|
|
|
33 |
p2_df["similarity"] = top_values
|
34 |
|
35 |
return p1_df, p2_df
|
|
|
36 |
"""
|
37 |
+
|
38 |
+
|
39 |
def calc_matches(filtered_df, project_df, similarity_matrix, top_x):
|
40 |
# Ensure the matrix is in a suitable format for manipulation
|
41 |
if not isinstance(similarity_matrix, csr_matrix):
|
|
|
75 |
print("finished calc matches")
|
76 |
|
77 |
return p1_df, p2_df
|
|
|
78 |
|