This paper provides an improved method for predicting the I–V curve of the photovoltaic module using a hybrid machine learning system. The proposed method is based on a random forest algorithm and a cascade forward neural network. A random forest algorithm is used to predict a specific factor that is subsequently used as an input for the cascade neural network to remove the correlation between voltage and current. Then, the actual current is predicted using the cascade neural network. This procedure assures the ability of the proposed model to extract the I–V curve of any photovoltaic module regardless of its rating or type. A dataset that contains values for air temperature, solar radiation, voltage, and current of two polycrystalline photovoltaic modules is used in the training process of the proposed algorithm. The hybrid model has general inputs such as ambient temperature, solar radiation, and data from the photovoltaic module datasheet (Voc and Isc). The proposed model is trained, tested, and validated by 86% of the data. Meanwhile, 14% of the data are used for testing. Thus, the proposed model is tested using unknown data so as to avoid overfitting. Results show that the proposed model is very accurate in predicting I–V curves based on three types of errors which are mean absolute percentage error (0.68%), mean bias error (0.0191 A), and root-mean-squared error (0.04458 A). This hybrid model can be used to obtain the I–V curves for several types of photovoltaic modules.