function [ypred,weights] = algoL2z(Xtrain, ytrain, Xtest, C, B)

if(~exist('C','var'))
    %C = 0.2112;
    C = 0.1839;
end

if(~exist('B','var'))
    %B = 0.0783;
    B = 0.0839;
end

Ztrain = bsxfun(@rdivide,Xtrain,sqrt(sum(Xtrain.*Xtrain,2)));
Ztest = bsxfun(@rdivide,Xtest,sqrt(sum(Xtest.*Xtest,2)));

[ypred,weights] = predictSVM(Ztrain,ytrain,Ztest,C,B);

iZero = ~any(ypred,2);
for i=iZero
    [~,iMax] = max(weights(i,:));
    ypred(i,iMax) = 1;
end
fprintf('%d zeros, ',sum(iZero));

%fprintf('%.4f %.4f ',C,B);

end