James McCool
commited on
Commit
·
ca4b602
1
Parent(s):
4765d52
Update name matching confidence threshold in find_name_mismatches.py
Browse files- Increased the confidence threshold for automatic name matching from 90% to 95% to improve accuracy in player name matches.
- This change enhances the reliability of the matching process, ensuring only high-confidence matches are considered.
global_func/find_name_mismatches.py
CHANGED
@@ -36,7 +36,7 @@ def find_name_mismatches(contest_df, projections_df, ownership_dict, fpts_dict):
|
|
36 |
st.warning(f"Skipping non-string value: {player}")
|
37 |
continue
|
38 |
closest_matches = process.extract(player, portfolio_players_list, limit=1)
|
39 |
-
if closest_matches[0][1] >=
|
40 |
match_name = closest_matches[0][0]
|
41 |
auto_matches[player] = match_name
|
42 |
st.success(f"Automatically matched '{player}' with '{match_name}' ({closest_matches[0][1]}% match)")
|
|
|
36 |
st.warning(f"Skipping non-string value: {player}")
|
37 |
continue
|
38 |
closest_matches = process.extract(player, portfolio_players_list, limit=1)
|
39 |
+
if closest_matches[0][1] >= 95: # If high confidence match found
|
40 |
match_name = closest_matches[0][0]
|
41 |
auto_matches[player] = match_name
|
42 |
st.success(f"Automatically matched '{player}' with '{match_name}' ({closest_matches[0][1]}% match)")
|