Prior starting, make sure to have admin rights on your device. While this is not a must-have it will make your life way easier.

A. Basics

1. Install R

3. Data Manipulation

install.packages('tidyverse')

4. General ML package

install.packages('caret')

5. Others packages in support

install.packages(c('rmarkdown',
                   'e1071',
                   'mlbench',
                   'ggthemes',
                   'assertthat',
                   'kernlab',
                   'rpart',
                   'rattle',
                   'kknn',
                   'randomForest',
                   'nnet',
                   'RSNNS',
                   'Metrics',
                   'AUC',
                   'plotly',
                   'rBayesianOptimization')
)

B. Jupyter Notebooks

In case you want to run our amazing notebooks offline.

1. Install the latest release of Python

Do not forget to set the following environment variables on your device

  • PATH must point to the directory of python.exe (e.g. C:\User\FolderWhereYouInstalledPython)
  • PATH must point to the directory of python.exe (e.g. C:\User\FolderWhereYouInstalledPython\scripts)

And, in case you are working on a corporate device:

3. From the CMD line (opened as administrator)

  • If you wish to use jupyter notebooks
pip install jupyter
  • If you prefer jupyterlab instead
pip install jupyterlab

4. Configure stuff in R

Do not forget to set the following environment variables on your device

  • PATH must point to the directory of R.exe (e.g. C:\Program Files\R\R-3.4.1\bin)
install.packages(c('repr',
                   'IRdisplay',
                   'evaluate',
                   'crayon',
                   'pbdZMQ',
                   'devtools',
                   'uuid',
                   'digest'))
  • Once you have installed the required packages, run this:
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec(user = FALSE)
  • Only if the command above did not work, please download and unzip this and run the following:
devtools::install('C:\whatheverFolderYouHaveUnzippedTheFile\IRKernel')
IRkernel::installspec(user = FALSE)

5. From the CMD line (again, opened as administrator)

  • Be sure to be in the right hard drive
C:
  • Download the source files and unzip.

  • Start jupyter/jupyterlab (a browser window should magically pop up). From there, you can source the .ipynb in the folder where you have downloaded it

jupyter-notebook
jupyter-lab
  • To end the jupyter session (once you are done), hit CTRL+C twice in the CMD line

C. Neural Networks

Requires Python installation (see B.)

1. 64-bit OS

Sorry, this is a must have.

2. Interface R - Python

install.packages('reticulate')

3. Neural Nets

install.packages(c('tensorflow',
                   'keras')
)

tensorflow::install_tensorflow()
keras::install_keras() # this may throw an error but work anyway

4. Save and Load trained models

Run the follwing in the command line.

pip install h5py

D. Cloud

In case you do not manage to execute A. and B. you can run everything from https://rstudio.cloud