Info

You can drag and drop these notebooks into your JypyterHub instance.

Below you will find the Jupyter Notebooks for the Friday sections. These are Python exercises that you must work on with your group and submit as a grade.

Below you will find the Jupyter Notebooks for the Monday/Wednesday lectures. These are supplementary notebooks that explore topics in the lectures. The examples shown in the lectures are implemented in these notebooks in addition to other content. These notebooks will be helpful for - understanding content in the lecture - completing computational homework exercises - completing the section notebooks (graded)

Mod2-Lec1

In this notebook we explore “Least squares approximate solutions” to

Ax=b \begin{aligned} Ax&=b \end{aligned}

That is solutions to the optimization problem

minxAxb22 \begin{aligned} \min_x\|Ax-b\|_2^2 \end{aligned}

Mod2-Lec2

In this notebook we explore data fitting in ML more generally.

Mod2-Lec3

In this notebook, we explore “Least Squares Classification”

  • notebook link
  • Iris data set is used in Mod2-Lec3 and is stored as a pickle file. It can be found here: iris data
  • You will also use the confusion matrix creator located in cf_matrix.py which can be found here

Info

The pickle package can be imported with import pickle. Once imported you

can load data using the command irisD=pk.load(open('./data/iris_data.p','rb')) where you have stored the pickle file iris_data.p in your current directory in the folder data.

Mod2-Lec4

In this notebook, we explore “Kernel Regression”