function [pred, acc, score] = test_svm(svm_model, model_params, X, Y)

% If no labels are given just use zeros
if nargin < 4
    Y = zeros(size(X, 1), 1);
end

switch model_params.svm_package
  case 'liblinear'
    %% Liblinear
    % options
    if strcmp(model_params.learner, 'SVR')
        option = '-b 1 -q';
    else
        option = '-q';
    end
    [pred, acc, score] = predict(Y, X, svm_model, option);
    
  case 'libsvm'
    %% Libsvm 
    % options
    if strcmp(model_params.learner, 'SVR')
        option = '-b 1 -q';
    else
        option = '-q';
    end
    [pred, acc, score] = svmpredict(Y, X, svm_model, option);
    
  otherwise
    error('unknown model package');
end

end
