fix get_coef() to calculate regression coefficients from regression polynomial of arbitrary order.