PeCAR: Integrating Penalized Conditional Absolute Regularization Loss Function in ANN for Enhanced Food Spoilage Prediction Accuracy
Pandey Shourya Prasad, Barath S Narayan, Madhav Rao
Abstract
In the context of food spoilage prediction, the accuracy of predictive models is critical for ensuring food safety and minimizing waste. Traditional loss functions often fail to adequately prioritize errors based on the varying significance of prediction intervals. This research introduces a customized loss function - PeCAR (Penalized Conditional Absolute Regu- larization) loss, tailored to enhance the predictive performance of ANNs for food spoilage time estimation. The proposed loss function incorporates the actual spoilage time of food items, thereby penalizing errors in short-term predictions more heav- ily than the same amount of error in long-term predictions. The proposed approach ensures that an absolute prediction error is weighted according to the relative importance of the time frame, reflecting the need for precise short-term predictions in items with shorter spoilage times. The result indicates a substantial improvement of 35.78% in Mean Absolute Error (MAE) and 25.32% in Mean Squared Error (MSE), enhancing the reliability of the model’s predictions for food spoilage. A unique chamber setup is designed for acquiring the dataset for different sets of food items. The 4-layer ANN model with the dataset of all the food items is made publicly available for easy adoption and further usage by the researchers and developers community.