Sales Forecasting with LSTM, Custom Loss Function, and Hyperparameter Optimization: A Case Study

Forecasting sales trends is a valuable activity for companies of all types and sizes, as it enables more efficient decision making to avoid unnecessary expenses from excess inventory or, conversely, losses due to insufficient inventory to meet demand. In this paper, we designed a personalized cost function to reduce economic losses caused by the excessive acquisition of products or derived from their scarcity when needed. Moreover, we designed an LSTM network integrated with Glorot and Orthogonal initializers and dropout to forecast sales trends in a lumber mill in Tamaulipas, Mexico. To generalize and appropriately forecast the sales of the lumber mill products, we optimized the LSTM network’s hyperparameters through a genetic algorithm, which was essential to explore the solution space. We evaluated our proposal in instances obtained from the historical sales of the five main products sold by the lumber mill. According to the results, we concluded that for our case study the proposed function cost and the hyperparameters optimization allowed the LSTM to forecast the direction and trend of the lumber mill’s product sales despite the variability of the products.

Authors

Institutions

Publication Details

Journal
Applied Sciences
Published
2024-10-31
DOI
https://doi.org/10.3390/app14219957
Citations
3
Primary Topic
Forecasting Techniques and Applications
Type
article
Field-Weighted Citation Impact
1.47
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Sales Forecasting with LSTM, Custom Loss Function, and Hyperparameter Optimization: A Case Study

Alejandro H. García-Ruiz, Roberto Pichardo, Luis J. González-del-Ángel, Hyasseliny A. Hurtado-Mora et al.
3 citations
Applied Sciences
Forecasting Techniques and Applications
1.47
article

Sales Forecasting with LSTM, Custom Loss Function, and Hyperparameter Optimization: A Case Study

Alejandro H. García-Ruiz, Roberto Pichardo, Luis J. González-del-Ángel, Hyasseliny A. Hurtado-Mora, Luis A. Herrera-Barajas
article en
3 citations

Abstract

Forecasting sales trends is a valuable activity for companies of all types and sizes, as it enables more efficient decision making to avoid unnecessary expenses from excess inventory or, conversely, losses due to insufficient inventory to meet demand. In this paper, we designed a personalized cost function to reduce economic losses caused by the excessive acquisition of products or derived from their scarcity when needed. Moreover, we designed an LSTM network integrated with Glorot and Orthogonal initializers and dropout to forecast sales trends in a lumber mill in Tamaulipas, Mexico. To generalize and appropriately forecast the sales of the lumber mill products, we optimized the LSTM network’s hyperparameters through a genetic algorithm, which was essential to explore the solution space. We evaluated our proposal in instances obtained from the historical sales of the five main products sold by the lumber mill. According to the results, we concluded that for our case study the proposed function cost and the hyperparameters optimization allowed the LSTM to forecast the direction and trend of the lumber mill’s product sales despite the variability of the products.

Applied SciencesVol. 14(21)
Autonomous University of Tamaulipas (MX)
Openalex Percentile: Top 16%
Forecasting Techniques and Applications
1.47
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.