Skip to main content

X-Goals package. Generated with cookiercutter-pylibrary using the command line cookiecutter gh:ionelmc/cookiecutter-pylibrary

Project description

X-Goals package. Generated with cookiercutter-pylibrary using the command line cookiecutter gh:ionelmc/cookiecutter- pylibrary

This is V1 of X-Goals which is an alternative method to score a match.

XGoals uses the weighting approach of 0.15 (corners), 0.2 (shots on) and -0.1 (cards).

Cards increases by 1 for a player’s first yellow card, and by 2.5 for a second yellow or a red (motivated by sportingindex.com weightings). Currently corners and shots on are modelled using the normal distribution, with 95% of values lying in the range [0, 2 times the expected value]; this means the spread is set to be half the expected value (this is motivated by historical behaviour for teams over a whole season, and clearly that’s not going to be ideal as it doesn’t account for the strength of the opposition properly. Don’t judge too harshly as this is just Version 1!). The distribution for the cards follows a Poisson distribution.

  • Free software: Apache Software License 2.0

Installation

pip install x-goals

Documentation

To use the project:

Open a Jupyter notebook and paste the following

import x_goals.app as application
xgoals_app = application.dash_app
applic.show_app(xgoals_app)

Development

To run the all tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows

set PYTEST_ADDOPTS=--cov-append
tox

Other

PYTEST_ADDOPTS=--cov-append tox

Changelog

0.0.1 (2018-11-12)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x-goals-0.0.2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x_goals-0.0.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file x-goals-0.0.2.tar.gz.

File metadata

  • Download URL: x-goals-0.0.2.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.6

File hashes

Hashes for x-goals-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5c4f3ea3e680400b4728d06538ce8f12df9606c6cdbbeded3b441c3e4db60f9f
MD5 1d2cb8ab656a786e269188f90b3d9ec9
BLAKE2b-256 36d0a9c424a95420a88d4751e0e67e281a785e28f9b612a302231f2df9b4a5e1

See more details on using hashes here.

File details

Details for the file x_goals-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: x_goals-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.6

File hashes

Hashes for x_goals-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d380ffcab4c2ee4f2493ad7696079a112d27e7a0eda6f74e40fb403d44208245
MD5 3ee31070470237616cae787f36b5d0c2
BLAKE2b-256 bbc01b477329c8c714c811a5be11cf4c51067367ae3d32a921b648715edfc64f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page