function gradient = lsq_gradient_sigmoid(parameter, x, y)
h = 1e-6;

gradient = zeros(size(parameter));
for i = 1:length(parameter)
    parameter_h = parameter;
    parameter_h(i) = parameter_h(i) + h;
    gradient(i) = (lsq_sigmoid_error(parameter_h, x, y) - lsq_sigmoid_error(parameter, x, y)) / h;
end