the MSE training, can i simply use mae function? or it's needed to use gradient of MAE instead of MSE in gradient_descent function?
here is the code
You need the correspondent gradient for MAE since its a different loss function. Here is an example: https://github.com/chenxingwei/machine_learning_from_scratch/blob/master/algorithm/2.linearRegressionGradientDescent.md
a guy told me that the model can be trained with gradient of MSE then the error can be calculated with different error metric such as MAE, MAPE and so on, is this a correct way? also in some papers several error metric such as MSE, MAE and MAPE used to measure the error of the model so do they train the model with the gradient of MSE, MAE and MAPE in order to calculate the error with these metrics?
In general, the "loss" function is not the same as an error "metric". For training, the loss is used to train the model, then, you need its gradient for the optimization process. The loss function and its gradient guide the training process. For evaluation of regression models, you can use multiple metrics like MSE, MAE, etc., to study different aspects of the model performance. However, metrics do not directly influence the training process, their intent is to be more interpretative.
thanks, i got it.
Обсуждают сегодня