function [ypred,ydist] = algoMean(Xtrain, ytrain, Xtest, C, B, gamma)

if(~exist('C','var'))
    C = 0.00104;
end

if(~exist('B','var'))
    B = 1;
end

if(~exist('gamma','var'))
    gamma = 0;
end

divider = sum(Xtrain)./sum(Xtrain>0);
divider(isnan(divider)) = 1;

Ztrain = bsxfun(@times,Xtrain,1./divider);
Zval = Xtest;
Zval(Zval~=0) = Zval(Zval~=0) + gamma;

[ypred,ydist] = predictSVM(Ztrain,ytrain,Zval,1,C,B);

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

end