cshaley / bracketeer

Generate predicted bracket from a kaggle march madness submission
MIT License
33 stars 13 forks source link

bracketeer

[PyPI]() [Python]() [license]() Travis

Generate predicted bracket from a kaggle march madness machine learning competition submission. https://www.kaggle.com/c/march-machine-learning-mania-2017

Installation

To install, do one of the following two things:

pip install bracketeer

OR

git clone https://github.com/cshaley/bracketeer.git
cd bracketeer
python setup.py install

Usage:

from bracketeer import build_bracket
b = build_bracket(
        outputPath='output.png',
        teamsPath='sample/Teams.csv',
        seedsPath='sample/NCAATourneySeeds.csv',
        submissionPath='sample/submit_example.csv',
        slotsPath='sample/NCAATourneySlots.csv',
        resultsPath=None,
        year=2019
)

resultsPath is an optional CSV file containing results of games already played. If it is provided then in the cases that the team the user predicted to win loses, it will substitute the actual winning team. This is intended to visualize the predictions for later rounds, after the match-ups are set.

Example,

from bracketeer import build_bracket
b = build_bracket(
        outputPath='output_current.png',
        teamsPath='sample/Teams.csv',
        seedsPath='sample/NCAATourneySeeds.csv',
        submissionPath='sample/submit_example.csv',
        slotsPath='sample/NCAATourneySlots.csv',
        resultsPath='sample/current_results_example.csv',
        year=2019
)

Dependencies

Additional input data/files not provided on kaggle:

Output is a bracket filled in with team seeds, names, and winning likelihood for each game.
The empty bracket is shown below. alt tag

The predicted bracket (this program's output) is shown below, for a set of randomly generated predictions: alt tag

The predicted bracket, after applying known results for the first round (based on the first round of the 2019 tournament): alt tag