The function get_nb_parameters must not take into account null parameters.
For GLMs the class predictor must have an additional function get_nb_parameters that count the number of non zero beta parameters (contrarely to the function size() that return the number of beta parameters).