Feature-Enriched Environmental and Temporal Forecasting via Enhanced XGBoost Algorithm
摘要
This study introduces a data-driven approach for predicting demand trends using sophisticated machine learning methods, particularly focusing on regression modeling with XGBoost. The framework incorporates temporal, categorical, and environmental factors—such as temperature, humidity, and calendar data—to capture the non- linear dynamics of sales patterns. Comprehensive preprocessing steps, including feature extraction, one-hot encoding, and standardization, were applied to enhance input rep- resentation. Various regression models were tested, including Decision Tree Regressor, Random Forest Regressor, K-Nearest Neighbors Regressor, and HistGradientBoosting Regressor. XGBoost surpassed all other models, achieving an R2 score of 0.92, owing to its capability to reduce regularized loss through additive tree ensembles. Real-time predictions were made possible by serializing the model and scaler, enabling forecasts based on dynamically inputted conditions. The system demonstrates significant scala- bility and adaptability. Results confirm XGBoost’s effectiveness for operational use in industries with highly fluctuating demand cycles.