;
args.lambda = lambdaL1;
args.preproc.kernelFn = @(X1, X2)kernelRbfSigma(X1, X2, SigmaL1);
args.preproc.rescaleX = true;
args.regType = 'L1';
LRL1model = logregFit(Xtrain, ytrain, args);
yhat = logregPredict(LRL1model, Xtest);
lrL1Nerrors = sum(yhat ~= ytest)
%% LR L2 (no kernel)
lambdas = logspace(-5,0,50);
LRL2model = fitCv(lambdas, @(X, y, l)logregFit(X, y, 'lambda', l, 'regType', 'L2'), ...
    @logregPredict, @zeroOneLossFn, Xtrain, ytrain); 


yhat = logregPredict(LRL2model, Xtest);
lr