Materials for the Machine Learning in Javascript Workshop by Expero inc
Given at the M3 Machine Learning Conference, London, Oct 2017
The majority of the course will be run in Jupyter notebooks. Jupyter is a REPL like interface embedded in a web page which is good for experimentation and exploratory development. It's very popular in the python and data science communities, so is also a good stepping stone into other ecosystems.
Using it means we need to install a python distribution even though we are working in javascript.
If you are learning ML some python is likely in your future. So we can maybe live with tha and after this course go find and experiment with some of the technqiues you will learn here in other toolsets.
- Install an IPython distribution
- I recomend installing Anaconda 3.6 it is heayweight but that is the distibution I have tested with and if you are interested in moving on apply some of the things you have learnt after the conference in python too, then this is a good starting point.
- Install node.js we are using v8.5.x.
- If you already have node installed and don't want to mess with your local environment, then install
nvm
and install node v8.5.x from there.- on Mac nvm
- on Windows nvm-windows
- Install the
jp-babel
variant of the IJavascript kernelnpm install -g jp-babel
- if you are running on linux check out the instructions on this page
- Install Javascript dependencies
- run
npm install
in the repo root folder :)
- Start the notebook
- run
jp-babel-notebook
in the repo root folder - a web browser should pop up showing the Jupyter browser / tree view of the current folder.
- From Jupyter, open the smoke test notebook
-
When the notebook opens you should be able to see the
jp-babel
javascript kernel loaded in the top right corner. -
If not, go to
Kernel Menu
>Change Kernel
and select thejp-babel
option and follow the prompts. -
In the
Cell Menu
, selectRun All
. Each cell should execute and if all dependencies are properly installed we shouldn't see any errors.
- docker build --tag=ml/ml . - please note that it downloads the original github repository, not the local files
- docker run --name ml1 -d -v :/data ml/ml
- the link to the jupyter can be seen in the logs with
docker logs ml1