Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
feb995d
1
Parent(s):
5481883
Add debug print statements in 'predict_dupes.py' to log key variables during calculation, aiding in the validation of the dupes calculation process.
Browse files
global_func/predict_dupes.py
CHANGED
|
@@ -189,6 +189,8 @@ def predict_dupes(portfolio, maps_dict, site_var, type_var, Contest_Size, streng
|
|
| 189 |
portfolio['dupes_calc'] = (portfolio['own_product'] * portfolio['avg_own_rank']) * Contest_Size + ((portfolio['salary'] - (max_salary - portfolio['Own'])) / 100) - ((max_salary - portfolio['salary']) / 100)
|
| 190 |
portfolio['dupes_calc'] = portfolio['dupes_calc'] * dupes_multiplier * (portfolio['Own'] / (120 + (Contest_Size / 1000)))
|
| 191 |
|
|
|
|
|
|
|
| 192 |
# Round and handle negative values
|
| 193 |
portfolio['Dupes'] = np.where(
|
| 194 |
portfolio['salary'] == max_salary,
|
|
@@ -200,6 +202,13 @@ def predict_dupes(portfolio, maps_dict, site_var, type_var, Contest_Size, streng
|
|
| 200 |
0,
|
| 201 |
np.round(portfolio['Dupes'], 0) - 1
|
| 202 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
elif type_var == 'Classic':
|
| 204 |
if sport_var == 'CS2':
|
| 205 |
dup_count_columns = ['CPT_Own_percent_rank', 'FLEX1_Own_percent_rank', 'FLEX2_Own_percent_rank', 'FLEX3_Own_percent_rank', 'FLEX4_Own_percent_rank', 'FLEX5_Own_percent_rank']
|
|
|
|
| 189 |
portfolio['dupes_calc'] = (portfolio['own_product'] * portfolio['avg_own_rank']) * Contest_Size + ((portfolio['salary'] - (max_salary - portfolio['Own'])) / 100) - ((max_salary - portfolio['salary']) / 100)
|
| 190 |
portfolio['dupes_calc'] = portfolio['dupes_calc'] * dupes_multiplier * (portfolio['Own'] / (120 + (Contest_Size / 1000)))
|
| 191 |
|
| 192 |
+
|
| 193 |
+
|
| 194 |
# Round and handle negative values
|
| 195 |
portfolio['Dupes'] = np.where(
|
| 196 |
portfolio['salary'] == max_salary,
|
|
|
|
| 202 |
0,
|
| 203 |
np.round(portfolio['Dupes'], 0) - 1
|
| 204 |
)
|
| 205 |
+
|
| 206 |
+
print(portfolio['own_product'])
|
| 207 |
+
print(portfolio['avg_own_rank'])
|
| 208 |
+
print(portfolio['salary'])
|
| 209 |
+
print(portfolio['Own'])
|
| 210 |
+
print(portfolio['dupes_calc'])
|
| 211 |
+
print(portfolio['Dupes'])
|
| 212 |
elif type_var == 'Classic':
|
| 213 |
if sport_var == 'CS2':
|
| 214 |
dup_count_columns = ['CPT_Own_percent_rank', 'FLEX1_Own_percent_rank', 'FLEX2_Own_percent_rank', 'FLEX3_Own_percent_rank', 'FLEX4_Own_percent_rank', 'FLEX5_Own_percent_rank']
|