James McCool
commited on
Commit
·
ad53305
1
Parent(s):
42c2829
Refactor own_product calculation in predict_dupes.py to remove Contest_Size dependency, simplifying the computation of player ownership metrics.
Browse files
global_func/predict_dupes.py
CHANGED
|
@@ -429,7 +429,7 @@ def predict_dupes(portfolio, maps_dict, site_var, type_var, Contest_Size, streng
|
|
| 429 |
portfolio[f'player_{i}_percent_rank'] = portfolio.iloc[:,i-1].map(maps_dict['own_percent_rank'])
|
| 430 |
portfolio[f'player_{i}_own'] = portfolio.iloc[:,i-1].map(maps_dict['own_map']).astype('float32') / 100
|
| 431 |
|
| 432 |
-
portfolio['own_product'] = (portfolio[own_columns].product(axis=1))
|
| 433 |
portfolio['own_average'] = (portfolio['Own'].max() * .33) / 100
|
| 434 |
portfolio['own_sum'] = portfolio[own_columns].sum(axis=1)
|
| 435 |
portfolio['avg_own_rank'] = portfolio[dup_count_columns].mean(axis=1)
|
|
|
|
| 429 |
portfolio[f'player_{i}_percent_rank'] = portfolio.iloc[:,i-1].map(maps_dict['own_percent_rank'])
|
| 430 |
portfolio[f'player_{i}_own'] = portfolio.iloc[:,i-1].map(maps_dict['own_map']).astype('float32') / 100
|
| 431 |
|
| 432 |
+
portfolio['own_product'] = (portfolio[own_columns].product(axis=1))
|
| 433 |
portfolio['own_average'] = (portfolio['Own'].max() * .33) / 100
|
| 434 |
portfolio['own_sum'] = portfolio[own_columns].sum(axis=1)
|
| 435 |
portfolio['avg_own_rank'] = portfolio[dup_count_columns].mean(axis=1)
|