Preditor is a all-in-one Japanese horse race (Keiba) prediction system written by Python.
The system is possible to provide all functions about prediction like extract data, transform, prediction and reporting.
Prerequisites: You have to set up in advance below:
- Python 3.6
- PostgreSQL
- sudo privileges without password
If you would like to start this project in your environment, you have to do below:
- Clone this project.
- To set up the environment, execute the following command in terminal:
# Install Libraries
pip install -r requirements.txt --upgrade
- To available of the local setting variables, rename "mysite/local_template.py" to "mysite/local.py".
- To define the database information, change database connection parameters of "mysite/local.py".
- You have to set up database in advance (I recommend to use PostgreSQL).
- To set up the Schema, execute the following command in terminal:
# Setup databases
cd ${PYTHON_PROJECT_DIR}
./manage.py migrate
# Create administrator
./manage.py createsuperuser
# Set password of jupyter
jupyter notebook password
- To available of web console, rename startup_template.sh to startup.sh and change EXC_USER and VENV_DIR of startup.sh.
EXC_USER=centos
VENV_DIR=/home/${EXC_USER}/.venv/preditor
- Execute startup.sh
cd ${PYTHON_PROJECT_DIR}
chmod +x startup.sh
./startup.sh
- You can access Django admin view (http://127.0.0.1/admin)
- Also access Jupyter notebook (http://127.0.0.1:8888/)
- After a short time, start collection of latest race data
- To collect history data, execute the following command in terminal:
# Start Shell
./manage.py collector --from 20170101
- 20170101 means collecting race data from January 1, 2017 to This Month. if you would like to collect more, you can set older date formatted at YYYYMMDD.
- To prediction future races, execute Sample.ipynb from jupyter notebook.
Date | Version | Comment |
---|---|---|
2018/01/07 | 1.0 | Released Initial Version. It is only possible to collect and enrich horse race data. |
2018/02/12 | 1.5 | Support PostgreSQL and Jupter Notebook. Improve crawling logic. |
2018/05/05 | 2.0 | Adding sample model and operating functions. Improving application architecture. |
- NetKeiba.com (Japanese Only)
- SportsNavi (Japanese Only)