Linear regression with gradient descent

Beijing Institute of Technology | Ming-Jian Li

The following Python code is a companion code for the course on Artificial Intelligence and Simulation Science. It functions to fit a curve using linear regression based on a given dataset and make predictions, with parameter optimization using the gradient descent method.

The process of the loss value decreasing is as follows: