Skip to content

new-village/preditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preditor

Maintainability MIT License
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.

How to Start

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:

  1. Clone this project.
  2. To set up the environment, execute the following command in terminal:
# Install Libraries
pip install -r requirements.txt --upgrade
  1. To available of the local setting variables, rename "mysite/local_template.py" to "mysite/local.py".
  2. 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).
  1. 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
  1. 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
  1. Execute startup.sh
cd ${PYTHON_PROJECT_DIR}
chmod +x startup.sh
./startup.sh
  1. 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.
  1. To prediction future races, execute Sample.ipynb from jupyter notebook.

History

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.

Reference

Data Source

Development