In the series Re:Zero - Starting Life in Another World, the main character Natsuki Subaru dies countless times and uses his "Return by Death" ability to go back in time. Each loop, he uses what he learned about the future to change what he does next.
Similarly, gradient descent is an iterative optimization process. Like Subaru's repeated attempts, the algorithm starts with poor initial parameters and "dies" (produces high error). Through repeated iterations, it uses knowledge of past errors (gradients) to adjust its parameters, converging toward an optimal prediction model.
Implement PolynomialRegression, a polynomial regression model of degree d trained with gradient descent.
