The recent global energy transition policies emphasize the utilization of renewable sources as a primary energy solution. Solar energy systems, in particular, offer significant advantages in terms of cost-effectiveness and environmental friendliness. This work focuses on the modeling of a photovoltaic-thermal (PV/T) air-based system using machine learning (ML) techniques. The primary contribution lies in estimating the electrical and thermal efficiencies of the PV/T system through the application of the random forest (RF) technique and K-fold cross-validation. The results obtained are notably impressive when compared to the most commonly used techniques reported in the literature: Artificial Neural Networks (ANN), Support Vector Machine (SVM), and linear regression (LR). The assessment demonstrates that Random Forest outperforms these techniques in predicting both Electrical efficiency and Thermal efficiency with R² values of 99.9996 % and 81.2 % respectively, and MAE of 0.0034 and 2.64 respectively. Furthermore, selecting the most important features for electrical efficiency not only reduced the processing time but also improved the performance. The Random Forest model exhibited robust stability and demonstrated strong generalization capabilities, as evidenced by its consistent and promising electrical efficiency performance across a 10-fold cross-validation assessment. The proposed method could be a key solution to accurately model the electrical and thermal performances and serve as an alternative to traditional physical modeling approaches.