James McCool
commited on
Commit
·
2cde0be
1
Parent(s):
46cffe3
Refactor ownership calculations in predict_dupes.py: remove redundant ownership columns for CS2, streamlining the duplication prediction logic and enhancing performance in portfolio analysis.
Browse files
global_func/predict_dupes.py
CHANGED
@@ -127,8 +127,8 @@ def predict_dupes(portfolio, maps_dict, site_var, type_var, Contest_Size, streng
|
|
127 |
)
|
128 |
if type_var == 'Classic':
|
129 |
if sport_var == 'CS2':
|
130 |
-
dup_count_columns = ['CPT_Own_percent_rank', 'FLEX1_Own_percent_rank', 'FLEX2_Own_percent_rank', 'FLEX3_Own_percent_rank', 'FLEX4_Own_percent_rank'
|
131 |
-
own_columns = ['CPT_Own', 'FLEX1_Own', 'FLEX2_Own', 'FLEX3_Own', 'FLEX4_Own'
|
132 |
calc_columns = ['own_product', 'own_average', 'own_sum', 'avg_own_rank', 'dupes_calc', 'low_own_count', 'Ref_Proj', 'Max_Proj', 'Min_Proj', 'Avg_Ref', 'own_ratio']
|
133 |
flex_ownerships = pd.concat([
|
134 |
portfolio.iloc[:,1].map(maps_dict['own_map']),
|
|
|
127 |
)
|
128 |
if type_var == 'Classic':
|
129 |
if sport_var == 'CS2':
|
130 |
+
dup_count_columns = ['CPT_Own_percent_rank', 'FLEX1_Own_percent_rank', 'FLEX2_Own_percent_rank', 'FLEX3_Own_percent_rank', 'FLEX4_Own_percent_rank']
|
131 |
+
own_columns = ['CPT_Own', 'FLEX1_Own', 'FLEX2_Own', 'FLEX3_Own', 'FLEX4_Own']
|
132 |
calc_columns = ['own_product', 'own_average', 'own_sum', 'avg_own_rank', 'dupes_calc', 'low_own_count', 'Ref_Proj', 'Max_Proj', 'Min_Proj', 'Avg_Ref', 'own_ratio']
|
133 |
flex_ownerships = pd.concat([
|
134 |
portfolio.iloc[:,1].map(maps_dict['own_map']),
|