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
You can download sports betting data:
from sportsbet.datasets import FTESoccerDataLoader dataloader = FTESoccerDataLoader() X_train, Y_train, O_train = dataloader.extract_train_data()
Use the historical data to backtest the performance of models:
from sportsbet.evaluation import ClassifierBettor num_features = [ col for col in X_train.columns if X_train[col].dtype in (np.dtype(int), np.dtype(float)) ] X_train = X_train[num_features] bettor = ClassifierBettor(KNeighborsClassifier()) bettor.backtest(X_train, Y_train, O_train)
Get the value bets using fixtures data:
X_fix, Y_fix, O_fix = dataloader.extract_fixtures_data() value_bets = bettor.bet(X_fix[num_features], 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
sports-betting-0.2.0.tar.gz
(4.6 MB
view hashes)
Built Distribution
Close
Hashes for sports_betting-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 079a85a3d58c7b12e67a3e0678b5d1bd8ec63f96ddd71826b79a013025ec4d91 |
|
MD5 | 2ddb9a4c50dd1e780acbb5de5ba708ba |
|
BLAKE2b-256 | 7bfbe0e7c9fb243b1422751b8bb6c2646af0da65d118627f3a921c4ab132c0cb |