Notes, examples, and Python demos for the 2nd edition of the textbook "Machine Learning Refined" (published by Cambridge University Press). 
# Machine Learning Refined IPython notebooks, Python and MATLAB files

[Click here](http://35.167.211.239:8000/) to launch a LIVE instance of the IPython notebooks in this repo.  

You can pull and run a Docker image of this entire repo (with all necessary libraries pre-installed) via the terminal command: 

docker run -d -u 0 -it -p 8888:8888 jermwatt/mlrefined

- - -
This repository contains various supplementary Jupyter notebooks, Python and MATLAB files, presentations associated with the textbook Machine Learning Refined (Cambridge University Press). Visit [http://www.mlrefined.com](www.mlrefined.com) for free chapter downloads and tutorials, and [our Amazon site here for details regarding a hard copy of the text](https://www.amazon.com/Machine-Learning-Refined-Foundations-Applications/dp/1107123526/ref=sr_1_1?ie=UTF8&qid=1471025359&sr=8-1&keywords=machine+learning+refined).

## Jupyter notebook Youtube video walkthroughts:

Below are links to a video walkthroughs for several of the Jupyter notebooks in this repository.  These briefly discuss the content of each notebook and show off their various interactive demos.  **Click the gif below each description to link directly to the corresponding walkthrough.**


### An introduction to the mlrefined repo and the Jupyter notebook walkthrough series
<a href="https://www.youtube.com/watch?v=qAHp91oaPmA&list=PLP4qPrZ20QB5IjpN0iQTgCepv54yA6kVF&index=1
" target="_blank"><img src="https://j.gifs.com/g5yPoZ.gif" 
alt="" width="400" height="400" border="10" /></a>



### Jupyter notebook walkthroughs - neural net space warping
<a href="(https://www.youtube.com/watch?v=8T56K8oou9Q&list=PLP4qPrZ20QB5IjpN0iQTgCepv54yA6kVF&index=5
" target="_blank"><img src="https://j.gifs.com/58Mg5A.gif" 
alt="" width="400" height="400" border="10" /></a>



### Jupyter notebook walkthrough - on basic optimization principles
<a href="(https://www.youtube.com/watch?v=l248ub44TRs&index=2&list=PLP4qPrZ20QB5IjpN0iQTgCepv54yA6kVF
" target="_blank"><img src="https://j.gifs.com/vgwk1L.gif" 
alt="" width="400" height="400" border="10" /></a>



### Jupyter notebook walkthrough - linear regression and optimization
<a href="(https://www.youtube.com/watch?v=5-QY6MCt7fo&index=3&list=PLP4qPrZ20QB5IjpN0iQTgCepv54yA6kVF
" target="_blank"><img src="https://j.gifs.com/Z4gR12.gif" 
alt="" width="400" height="400" border="10" /></a>



### Jupyter notebook walkthroughs - regression and kernels / neural nets / trees
<a href="(https://www.youtube.com/watch?v=VITu0cHBQto&index=4&list=PLP4qPrZ20QB5IjpN0iQTgCepv54yA6kVF
" target="_blank"><img src="https://j.gifs.com/pgnP3m.gif" 
alt="" width="400" height="400" border="10" /></a>




## Video tutorial on regression and L2 regularization

Below is an older video tutorial illustrating how L2 regularization convexifies nonconvex cost functions, thereby making minimization of such functions easier.  The code (l2reg_logistic, which you may find here) shows the result of applying L2 regularization to a nonconvex form of logistic regression on a simple dataset, as well as the resulting convexificaation of this cost function due to regularization.   Again, some principles from the chapter - which is available for download at www.mlrefined.com -  are briefly described before jumping into the code.

[![Demo Doccou alpha](https://j.gifs.com/AD8OG1.gif)](https://youtu.be/ON_7wm-Qe6c)


