In the series Re:Zero - Starting Life in Another World, the main character Natsuki Subaru dies countless times, utilizing his "Return by Death" ability to return to the past. With each iteration, he uses knowledge of future events to adjust his actions and achieve an optimal outcome.
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 via gradient descent that iteratively learns from its errors to achieve optimal predictions.
