function alg = check_regression_alg(label)

% alg = check_regression_alg(label)
% 
% This function check chosen regression algorithm string and returns 
% the string representing chosen algorithm of regression.
%
% label     - regress. algorithm string (one of available possibilities)
% alg       - output string containing the algorithm of regression
%
%
%
% --
% ing. Zoltán Galáž
% xgalaz00@stud.feec.vutbr.cz       
% 
% Department of Telecommunications
% Faculty of Electrical Engineering and Communication
% Brno University of Technology

%% Lower the algorithm specification (for consistency)
label = lower(label);

%% Check the regression algorithm description
if (strcmp(label, 'classificationandregressiontrees')              || ...
    strcmp(label, 'classification and regression trees')           || ...
    strcmp(label, 'regressiontrees')                               || ...
    strcmp(label, 'regression trees')                              || ...
    strcmp(label, 'cart algorithm')                                || ...
    strcmp(label, 'cart'))
    
    % Classification and Regression Trees algorithm
    alg = 'cart';
else
    alg = [];
end