-.5;
% add some outliers
x = [x' 0.1 0.5 0.9]';
k =  -5;
y = [y' k  k k]';

n = length(x);
Xtrain = x(:);
modelLS = linregFit(Xtrain, y, 'lambda', 0);% least squares soln
xs = 0:0.1:1;
Xtest = xs(:);
yhatLS = linregPredict(modelLS, Xtest);



%% Laplace loss
modelLP = linregRobustLaplaceFitLinprog(Xtrain, y);
yhatLaplace = linregPredict(modelLP, Xtest);

%% Student loss 
modelStudent = linregRobustStudentFit(Xtrain, y);
yhatStudent = linregPredict(modelStudent, Xtest);


%% Huber loss
deltas = [1];
for i=1: