Skip to content

Commit

Permalink
change weightage & average is used for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
razn committed Sep 7, 2024
1 parent f104f11 commit f587645
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions custom/players.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,13 @@ def builder(self, ownership, tqdm_desc):
}

# this is an experimental feature
xg_weightage = 0.3
xa_weightage = 0.25
perf_weightage = 0.2
fda_weightage = 0.15
price_weightage = 0.1
xgi_weightage = 0.60
perf_weightage = 0.1
fda_weightage = 0.25
price_weightage = 0.05
stats[fpl_id]["weighted_value"] = round(
(stats[fpl_id]["xg"] * xg_weightage)
+ (stats[fpl_id]["xa"] * xa_weightage)
+ (stats[fpl_id]["total_pts_prev_n_gw"] * perf_weightage)
+ (stats[fpl_id]["xgi"] * xgi_weightage)
+ (stats[fpl_id]["total_pts_prev_n_gw"] / Gameweek.NO_OF_PREV_GWS * perf_weightage)
+ (1 / stats[fpl_id]["fdr_avg"] * fda_weightage)
+ (1 / stats[fpl_id]["latest_price"] * price_weightage),
1,
Expand Down

0 comments on commit f587645

Please sign in to comment.