i've a doubt on this thing.
It may seem like the MSE (Mean Squared Error) is calculated twice, but in reality, it is used at two different stages during the training process:
Weight Calculation: The first time the MSE is used is to minimize the error function and find the optimal weights w1w1 and w0w0 for the model. This process involves solving an optimization problem, where the goal is to find the weights that minimize the MSE. In other words, we are trying to make the sum of the squared errors between the predicted values y^iy^i and the actual values yiyi as small as possible.
Model Evaluation: Once the optimal weights are found, the MSE is recalculated using the obtained weights to assess how well the model fits the data. In this second step, the MSE is used as a performance metric to measure the error between the model’s predictions and the actual data points, using the optimized weights.
In summary, the MSE is first minimized to determine the best weights and then recalculated with those weights to evaluate the model’s final performance. This explains why it may seem like the MSE is "calculated twice."
Is that thing right? Do we really have a two time calculus of MSE ?