Python sports betting toolbox.
Project description
sports-betting
Introduction
The sports-betting package is a collection of tools that makes it easy to create machine learning models for sports betting and evaluate their performance. It is compatible with scikit-learn.
Usage
The sports-betting package makes it easy to download training and fixtures sports betting data:
>>> from sportsbet.datasets import SoccerDataLoader >>> dataloader = SoccerDataLoader(param_grid={'league': ['Italy'], 'year': [2020]}) >>> X_train, Y_train, O_train = dataloader.extract_train_data(odds_type='market_maximum', drop_na_thres=1.0) >>> X_fix, Y_fix, O_fix = dataloader.extract_fixtures_data()
The historical data can be used to backtest the performance of a bettor model:
>>> from sportsbet.evaluation import ClassifierBettor >>> from sklearn.dummy import DummyClassifier >>> bettor = ClassifierBettor(DummyClassifier()) >>> bettor.backtest(X_train, Y_train, O_train)
We can get the value bets using fixtures data:
>>> bettor.bet(X_fix, O_fix)
Installation
sports-betting is currently available on the PyPi’s repositories and you can install it via pip:
pip install -U sports-betting
The package is released also in Anaconda Cloud platform:
conda install -c gdouzas sports-betting
Documentation
Installation documentation, API documentation, and examples can be found in the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sports_betting-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0857cd211a99c6ed2d01cd9d45cbe638d24aa60f2e11a9899cba3bb471161ca |
|
MD5 | 0de078da4caf57efbd7e6acd1a8613c7 |
|
BLAKE2b-256 | a3e26868d9b7b4cb06981ad73afc3574a67e89cd58692b97f07e73dc0645c764 |