unrealities / MTGA_Draft_17Lands

Magic: The Gathering Arena draft tool that utilizes 17Lands data
MIT License
26 stars 1 forks source link

Grade fixes #7

Closed FiYir closed 3 months ago

FiYir commented 3 months ago

Updated the metrics calculation functions to use built-in functions from the Statistics library, relocating the previous code to a new 'set_metrics' module.

Fixed a bug where duplicate cards were mistakenly included in the metrics computation; now, only unique cards are considered.

Validated changes by comparing computed metrics against 17Lands website values. Tests are available in 'test_set_metrics.py'.

Added a method in the new 'SetMetrics' class to compute card percentiles using a normal distribution. Initially intended for integrating LimitedGrades into the app, I abandoned it due to inconsistencies with the site's results and redundancy with the existing z-score-based grades.

Though percentile grades weren't added, the code can easily accommodate them if needed.