GithubHelp home page GithubHelp logo

john296266807 / predictivepunter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jayteegeezy/predictivepunter

0.0 1.0 0.0 56 KB

Applying predictive analytics to horse racing via Python

License: MIT License

Python 100.00%

predictivepunter's Introduction

predictivepunter

Applying predictive analytics to horse racing via Python

Installation

To install the latest release of predictivepunter to your current Python environment, execute the following command:

pip install predictivepunter

Alternatively, to install predictivepunter from a source distribution, execute the following command from the root directory of the predictivepunter repository:

python setup.py install

To install predictivepunter from a source distribution as a symlink for development purposes, execute the following command from the root directory of the predictivepunter repository instead:

python setup.py develop

Usage

Before using predictivepunter to predict the results of future races, a local database must be populated with historical racing data. To pre-populate the database, a 'scrape' command-line utility is made available to any Python environment in which predictivepunter is installed, and can be called with the following command line:

scrape <options>

Valid options for the scrape command-line utility are documented below:

-b, --backup-database
 Dump the database to the filesystem after scraping each day's data (default: False)
-d from-to, --date=from-to
 The range of dates to scrape (default: today-today)
-n name, --database-name=name
 The name of the database to use (default: predictivepunter)
-q, --quiet Suppress progress log messages (default: False)
-t threads, --threads=threads
 The number of threads to use (default: 4)
-v, --verbose Output debugging log messages (default: False)
-x expiry, --cache-expiry=expiry
 The HTTP cache timeout period in seconds (default: 600)

With a local database of historical racing data populated, the next step is to pre-seed query data for each of the runners stored in the database. To pre-seed query data, a 'seed' command-line utility is made available to any Python environment in which predictivepunter is installed, and can be called with the following command line:

seed <options>

Valid options for the seed command-line utility are the same as those documented for the scrape command-line utility above.

With query data seeded in the database, predictions can be made using the predict command-line utility as follows:

predict <options>

Valid options for the predict command-line utility are the same as those documented for the scrape command-line utility above.

The predict command-line utility will produce a CSV-formatted list on sys.stdout, of predictions for all races in the specified date range.

Testing

To run the included test suite, execute the following command from the root directory of the predictivepunter repository:

python setup.py test

The above command will ensure all test dependencies are installed in your current Python environment. For more concise output during subsequent test runs, the following command can be executed from the root directory of the predictivepunter repository instead:

nosetests

Alternatively, individual components of pyracing can be tested by executing any of the following commands from the root directory of the pyracing repository:

nosetests predictivepunter.test.scrape
nosetests predictivepunter.test.seed
nosetests predictivepunter.test.predict

Version History

0.4.0 (29 April 2016)
Interim release to implement jockey statistics
0.3.1 (28 April 2016)
Fix ImportError in command-line utilities
0.3.0 (28 April 2016)
Interim release to facilitate initial predictions
0.2.3 (27 April 2016)
Fix ZeroDivisionErrors
0.2.2 (27 April 2016)
Fix ValueErrors in generate_seed
0.2.1 (26 April 2016)
Fix memory leak and schema when seeding query data
0.2.0 (26 April 2016)
Interim release to facilitate pre-seeding query data
0.1.1 (22 April 2016)
Fix exceptions in pypunters and pyracing
0.1.0 (21 April 2016)
Interim release to facilitate database pre-population

predictivepunter's People

Contributors

jayteegeezy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.