Maintaining a suitable microclimate environment in a greenhouse is essential for edible fungus growth. This study aims to predict the greenhouse temperature for edible fungi more accurately and efficiently and to provide decision support for their production management. For this purpose, a new method that combines the improved particle swarm optimization (IPSO) with the regularized extreme learning machine (RELM) network algorithm was proposed to enhance the accuracy and efficiency of temperature prediction. The proposed method selects RELM as the basic model that can be effectively applied to the prediction of complex nonlinear systems and makes three improvements to the standard PSO and the parameter optimization for RELM based on IPSO. In addition, four-month temperature data acquisition experiments were carried out in the Daxing District of Beijing, and the time series dataset of greenhouse temperature was collected, preprocessed, and further used to train and validate the proposed models. The results show that the IPSO-RELM model is superior to extreme learning machine (ELM), RELM, least squares support vector regression (LSSVR), and back propagation neural network (BPNN) for predicting the temperature of edible fungi greenhouses, with the least mean-square error (MSE) and large coefficient of determination (R2) values of 0.441 and 0.985, respectively. The results also demonstrated the necessity of incorporating historical variables into predictive modeling. The Wilcoxon signed-rank test is further used to verify that the prediction performance of the IPSO-RELM model is significantly different from the other developed algorithms. Because this study considers multiple historical environmental factors that affect greenhouse temperature, it is applicable to various greenhouse scenarios and has universal applicability. This study provides insights for RELM network- related research and the methods for temperature prediction in other application scenarios, as well as practical decision- making for the temperature control and environmental management of the edible fungi greenhouse.