Occupancy prediction has been the subject of ongoing research, employing various methods and data sources to improve occupancy prediction accuracy and energy efficiency in buildings. Precise occupancy prediction is crucial for optimizing energy usage, ensuring occupant comfort, and enhancing building management. With the increasing demand for intelligent building management systems, robust and accurate occupancy prediction models are becoming more critical. This study aims to predict building occupancy using WiFi Syslog files from three different datasets: an open-source dataset from the University of Massachusetts Dartmouth, a new locally collected dataset from the dental school at the University of Detroit Mercy, and finally, a dataset from an office building in Berkeley, California. Two types of features, static features, and MOTIF time series features, were extracted from the datasets to process and compare their performance in occupancy prediction. The first step of the proposed framework consisted of selecting the most suitable time range to compare occupancy prediction models between different datasets. It was concluded that this analysis was best conducted semester by semester. Multiple regression algorithms, such as random forest and LightGBM, were applied in the following step, along with advanced ensemble techniques, including stacking and blending, to assess the model. The stacking regression showed the best results for static features across all datasets. It achieved a Coefficient of Determination (R2) R 2 ) of 0.9540 in the first dataset, 0.9482 in the second, and 0.9977 in the third. For MOTIF features, however, the best algorithm depended on the dataset. All algorithms performed similarly in the first dataset, with R2 2 of 0.956. In contrast, LightGBM and the Stacking Regressor had better results than the others in the second dataset, with a low R2 2 of 0.531 due to dataset-specific differences. The stacking regression once again delivered the best results in the last dataset with an R2 2 of 0.9967.