In [4]:
import numpy as np
import numpy.linalg as la
import matplotlib.pyplot as plt
%matplotlib inline

(2) Load the Labels and Data

Labels

In [ ]:
 

Data

In [ ]:
 

Plot some columns

In [ ]:
 

(3) Construct $A$ and $b$

create b

In [ ]:
 

create A_linear and B_linear (for linear training and validation data)

In [ ]:
 

(4) Solving the problem

solve the problem with QR

In [ ]:
 

construct a prediction vector

In [ ]:
 

plot false-positive and false-negatives

In [ ]:
 

(5) Quadratic model

create b

In [ ]:
 

create A_quad and B_quad

In [ ]:
 

solve and predict

In [ ]: