MyNixOS website logo
Description

A Simple Data Science Challenge System.

A simple data science challenge system using R Markdown and 'Dropbox' <https://www.dropbox.com/>. It requires no network configuration, does not depend on external platforms like e.g. 'Kaggle' <https://www.kaggle.com/> and can be easily installed on a personal computer.

rchallenge

R-CMD-check CRAN_Status_Badge CRAN RStudio mirror downloads GPLv2 License

The rchallenge R package provides a simple data science competition system using R Markdown and Dropbox with the following features:

  • No network configuration required.
  • Does not depend on external platforms like e.g. Kaggle.
  • Can be easily installed on a personal computer.
  • Provides a customizable template in english and french.

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.

Installation

Install the R package from CRAN repositories

install.packages("rchallenge")

or install the latest development version from GitHub

# install.packages("devtools")
devtools::install_github("adrtod/rchallenge")

A recent version of pandoc (>= 1.12.3) is also required. See the pandoc installation instructions for details on installing pandoc for your platform.

Getting started

Install a new challenge in Dropbox/mychallenge:

setwd("~/Dropbox/mychallenge")
library(rchallenge)
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:

  • 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 South German Credit data set.

You can easily customize the challenge in two ways:

  • During the creation of the challenge: by using the options of the new_challenge() function.
  • After the creation of the challenge: by manually replacing the data files in the data subdirectory and the baseline predictions in submissions/baseline and by customizing the template challenge.rmd as needed.

Next steps

To complete the installation:

  1. Create and share subdirectories in submissions for each team:

    new_team("team_foo", "team_bar")
    
  2. Render the HTML page:

    publish()
    

    Use the output_dir argument to change the output directory. Make sure the output HTML file is rendered, e.g. using GitHub Pages.

  3. Give the URL to your HTML file to the participants.

  4. Refresh the webpage by repeating step 2 on a regular basis. See below for automating this step.

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:

  • 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.

Automating the updates

Unix/OSX

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 render a HTML webpage every hour. Use the output_dir argument to change the output directory.

If your challenge is hosted on a Github repository you can automate the push:

0 * * * * cd ~/Dropbox/mychallenge && Rscript -e 'rchallenge::publish()' && git commit -m "update html" index.html && git push

You might have to add the path to Rscript and pandoc at the beginning of your crontab:

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Depending on your system or pandoc version you might also have to explicitly add the encoding option to the command:

0 * * * * Rscript -e 'rchallenge::publish("~/Dropbox/mychallenge/challenge.rmd", encoding = "utf8")'

Windows

You can use the Task Scheduler to create a new task with a Start a program action with the settings (mind the quotes):

  • Program/script: Rscript.exe
  • options: -e rchallenge::publish('~/Dropbox/mychallenge/challenge.rmd')

Issues

Examples

Please contact me to add yours.

Copyright

Copyright (C) 2014-2015 Adrien Todeschini.

Contributions from Robin Genuer.

The rchallenge package is licensed under the GPLv2 (https://www.gnu.org/licenses/gpl-2.0.html).

To do list

  • [ ] do not take baseline into account in ranking
  • [ ] examples, tests, vignettes
  • [ ] interactive plots with ggvis
  • [ ] check arguments
  • [ ] interactive webpage using Shiny.
Metadata

Version

1.3.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows