An objective function, or cost function, aggregates prediction error across training examples. A loss measures error for an individual example; the cost combines those losses and is minimized by adjusting model weights. section 3.3.1 section 4.2.1
For linear regression predicting solubility, mean squared error averages the squared differences between predicted and known values. Errors farther from the fitted line receive greater penalties, and the model searches for weights that minimize this cost. section 4.2.1
The equation expresses mean squared error as the average of squared prediction errors across the dataset. section 4.2.1









































