Sequential outlier detection

$$ \newcommand{\eg}{{\it e.g.}} \newcommand{\ie}{{\it i.e.}} \newcommand{\argmin}{\operatornamewithlimits{argmin}} \newcommand{\mc}{\mathcal} \newcommand{\mb}{\mathbb} \newcommand{\mf}{\mathbf} \newcommand{\minimize}{{\text{minimize}}} \newcommand{\diag}{{\text{diag}}} \newcommand{\cond}{{\text{cond}}} \newcommand{\rank}{{\text{rank }}} \newcommand{\range}{{\mathcal{R}}} \newcommand{\null}{{\mathcal{N}}} \newcommand{\tr}{{\text{trace}}} \newcommand{\dom}{{\text{dom}}} \newcommand{\dist}{{\text{dist}}} \newcommand{\R}{\mathbf{R}} \newcommand{\SM}{\mathbf{S}} \newcommand{\ball}{\mathcal{B}} \newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}} $$

EE787: Machine learning, Kyung Hee University.
Jong-Han Kim (jonghank@khu.ac.kr)

You will first have to install the following packages, if you still haven't. For example, the following cell if uncommented will do it.

In [1]:
#using Pkg
#Pkg.add(["HTTP", "JSON", "PyPlot"])

The following cell will load the fitting_outliers.json file that you need for this assignment.

In [2]:
using HTTP, JSON, PyPlot

resp = HTTP.get("https://jonghank.github.io/ee787/files/fitting_outliers.json")
str = String(resp.body)
jobj = JSON.Parser.parse(str)

U = jobj["U"]["data"]
v = jobj["v"]["data"]

figure(figsize=(6,6), dpi=100)
plot(U,v, "o", alpha=0.5)
xlabel("U")
ylabel("v")
grid()
show()

The rest is for you...

In [ ]:
# your code here