The rchallenge R package provides a simple datascience competition system using R Markdown and Dropbox with the following features:
Further documentation is available in the Reference manual.
Please report bugs, troubles or discussions on the Issues tracker. Any contribution to improve the package is welcome.
Install the latest version of the R package from GitHub
# install.packages("devtools")
devtools::install_github("adrtod/rchallenge")
Install a new challenge in Dropbox/mychallenge
setwd("~/Dropbox/mychallenge") library(rchallenge) ?new_challenge new_challenge()
or for a french version
new_challenge(template = "fr")
You will obtain a ready-to-use challenge in the folder Dropbox/mychallenge
containing:
Name | Description |
---|---|
challenge.rmd |
Template R Markdown script for the webpage. |
data |
Directory of the data containing data_train and data_test datasets. |
submissions |
Directory of the submissions. It will contain one subdirectory per team where they can submit their submissions. The subdirectories are shared with Dropbox. |
history |
Directory where the submissions history is stored. |
The default challenge provided is a binary classification problem on the German Credit Card) dataset.
You can easily customize the challenge in two ways:
new_challenge
function.data
subdirectory and the baseline predictions in submissions/baseline
and by customizing the template challenge.rmd
as needed.To complete the installation:
Create and share subdirectories in submissions
for each team:
?new_team new_team("team_foo", "team_bar")
Publish the html page in Dropbox/Public
:
?publish publish()
Prior to this, make sure you enabled your Public Dropbox folder.
Give the public link to your Dropbox/Public/challenge.html
file to the participants.
Automate the updates of the webpage.
For the step 4, on Unix systems, you can setup the following
line to your crontab using crontab -e
(mind the quotes):
0 * * * * Rscript -e 'rchallenge::publish("~/Dropbox/mychallenge/challenge.rmd")'
This will publish a html webpage in your Dropbox/Public
folder every hour.
On Windows systems, you can use the Task Scheduler to create a new task with a Start a program action with the settings (mind the quotes):
Rscript.exe
-e rchallenge::publish('~/Dropbox/mychallenge/challenge.rmd')
From now on, a fully autonomous challenge system is set up requiring no further administration. With each update, the program automatically performs the following tasks using the functions available in our package:
Name | Description |
---|---|
store_new_submissions |
Reads submitted files and save new files in the history. |
print_readerr |
Displays any read errors. |
compute_metrics |
Calculates the scores for each submission in the history. |
get_best |
Gets the highest score per team. |
print_leaderboard |
Displays the leaderboard. |
plot_history |
Plots a chart of score evolution per team. |
plot_activity |
Plots a chart of activity per team. |
My own challenge (in french) given to Master students at the University of Bordeaux.
A classification and variable selection problem (in french) given by Robin Genuer (Bordeaux).
Please contact me to add yours.
Copyright © 2014-2015 Adrien Todeschini.
Contributions from Robin Genuer.
Design inspired by Datascience.net, a french platform for datascience challenges.
The rchallenge package is licensed under the GPLv2 (http://www.gnu.org/licenses/gpl-2.0.html).
out_rmdfile
argument to new_challenge
template
argument to c("en", "fr")
new_team
can create several teamsnew_team
functionpublish
new_challenge
new_team
german
data_split
publish
store_new_submissions
compute_metrics
get_best
update_rank_diff
countdown
last_update
print_readerr
print_leaderboard
glyphicon
html_img
plot_history
plot_activity
get_data