Skip to content

Latest commit

 

History

History
78 lines (66 loc) · 2.11 KB

README.md

File metadata and controls

78 lines (66 loc) · 2.11 KB

Flask Leaderboard

Make simple leaderboard for machine learning competition using Flask

Admin is able to:

  • See Public & Private Leaderboard
  • CURD User & Submission

The Flask Leaderboard repo enable users to:

  • See Public Leaderboard
  • Login & Register User
  • Public & Private Submission

How to Use it As a Admin

How to Use it As a User

Clone and Install

Clone the repo using git clone https://github.com/vindruid/flask_leaderboard.git
Then install the package with the version pip install -r requirements.txt

Insert Master Key

Put your key inside folder master_key with name public_key.csv and private_key.csv
with column data_id and prediction
for example

data_id,prediction
1,5
2,4
3,4.1
4,9
5,6.8

Change Metric Score

open app.py

change greater_better parameter

greater_better = True

if greatest score is the best (i.e. Accuracy, R2 Score)

greater_better = False

if lowest score is the best (i.e. Mean Square Error, log loss)

change metric parameter

Using scikit learn metrics
for example

from sklearn.metrics import mean_squared_error

metric = mean_squared_error

Ensure the metric you choose align with the greater_better parameter

Run Flask App

in your terminal, run python app.py
Then you will see a page open in your browser with url http://localhost:5000/

Make Admin account

Go to register page http://localhost:5000/register or click register button at the top left
Then perserve admin username, the password is up to you. You can go to http://localhost:5000/admin by login with admin username. At that page, you can manage user and submission (create, read, update, and delete)