In the Predicting house prices recipe, we learned about defining a custom loss function. However, we are not in a position yet to assign a higher weightage for certain rows over others. (We did a similar exercise for a credit default prediction case study where we assigned higher weightage to one class over the other; however, that was a classification problem, and the current problem that we are solving is a continuous variable-prediction problem.)
In this section, we will define weights for each row and then pass them to the custom_loss function that we will define.
We will continue working on the same dataset that we analyzed in the Stock price prediction recipe.