function [w, loss_history] = train(data, mu, num_iters, regularization, lambda)
% Vrsi trening modela koristeci algoritam gradijentnog spusta.

X = data(:, 1:end-1);
y = data(:, end);
m = length(y);
X = [ones(m, 1) X];
w = zeros(size(X, 2), 1);

[w, loss_history] = gradient_descent(X, y, w, num_iters, mu, regularization, lambda);

end
