James McCool commited on
Commit
606905f
·
1 Parent(s): 8c72f5c

Update weighted ownership calculation in predict_dupes.py: adjust the multiplication factor for ownership values and change the return value to a larger scale, enhancing the accuracy of percentage representation in ownership metrics.

Browse files
Files changed (1) hide show
  1. global_func/predict_dupes.py +2 -2
global_func/predict_dupes.py CHANGED
@@ -29,13 +29,13 @@ def calculate_weighted_ownership(row_ownerships):
29
  avg_of_means = sum(value_means) / len(row_ownerships)
30
 
31
  # Multiply by count of values
32
- weighted = avg_of_means * len(row_ownerships)
33
 
34
  # Subtract (max - min)
35
  weighted = weighted - (row_ownerships.max() - row_ownerships.min())
36
 
37
  # Convert back to percentage form to match input format
38
- return weighted * 100
39
 
40
  def predict_dupes(portfolio, maps_dict, site_var, type_var, Contest_Size, strength_var, sport_var):
41
  if strength_var == 'Weak':
 
29
  avg_of_means = sum(value_means) / len(row_ownerships)
30
 
31
  # Multiply by count of values
32
+ weighted = avg_of_means * (len(row_ownerships) * 1)
33
 
34
  # Subtract (max - min)
35
  weighted = weighted - (row_ownerships.max() - row_ownerships.min())
36
 
37
  # Convert back to percentage form to match input format
38
+ return weighted * 10000
39
 
40
  def predict_dupes(portfolio, maps_dict, site_var, type_var, Contest_Size, strength_var, sport_var):
41
  if strength_var == 'Weak':