polynomial regression python from scratch