DOI: https://doi.org/10.14456/jsat.2025.4
Abstract
This study examined the use of artificial intelligence (AI), specifically Natural Language Processing (NLP), to predict income and expense trends for pineapple farmers in Ban Yang Subdistrict, Nakhon Thai District, Phitsanulok Province. The research focused on processing semi-unstructured accounting data, mainly from PDF files, provided by 30 farmers with prior accounting experience. A custom NLP algorithm was used to classify financial records into payment and income categories. Three time series forecasting models—Prophet, LSTM, and ARIMA—were applied to comparatively predict future trends. LSTM excels at capturing complex long-term patterns, Prophet effectively models seasonal and event-driven fluctuations, and ARIMA is well suited for identifying linear trends and short-term changes. The results showed that ARIMA outperformed both LSTM and Prophet in terms of accuracy and explanatory power. ARIMA achieved the lowest Mean Absolute Error (MAE) of 34.1084 and the highest R-squared (R²) of 0.9901, indicating superior prediction performance. LSTM had a MAE
of 71.0920 and an R² of 0.9511, showing good accuracy but with higher MAE and lower R² compared to ARIMA. Prophet had the highest MAE of 603.8044 and the lowest R² of -3.2273, reflecting poor performance. Based on these results, ARIMA is identified as the most suitable model for this dataset. ARIMA’s performance improved with longer forecast periods. For a 10-day forecast, it showed relatively low accuracy. As the forecast period extended to 20 and 30 days, accuracy and explanatory power increased, with the best results observed for the 30-day forecast. These findings suggest that ARIMA performs better for longer-term predictions. Future work could optimize the model and incorporate additional features for improved accuracy.
Keywords: artificial intelligence, income and expense accounting trend, semi-unstructured data; pineapple farmer
Received: January 13, 2025. Revised: June 17, 2025. Accepted: June 23, 2025.