Fused deposition modeling (FDM)-based 4D printing uses thermoplastics to produce artifacts and requires computational analysis to assist its design processes of complex geometries. Previously, finite element analysis (FEA) has been used to simulate 4D printing deformations, and its accuracy has been computationally and experimentally verified. However, using FEA also leads to several limitations, such as geometric approximation error and the computational time-cost due to the high degrees of freedom. To address these issues, this paper introduces isogeometric analysis (IGA) into the deformation simulations and propounds a composite design by hybridizing FEA and IGA elements to reduce the number of degrees of freedom while maintaining the simulation accuracy. Moreover, since the hybrid IGA-FEA method used for modeling 4D printing structure deformation excludes real-time interactivity, we develop a polycube-based random forest regressor machine learning (ML) model to learn the IGA-FEA-based structural mechanics simulations and provide fast deformation predictions. Given the input actuator block distribution and geometry configurations, our well-trained model can predict the residual stress-induced deformation behaviors of mesh-like thermoplastic composite structures. With an error less than 0.11% and computation speed 20 times faster than hybrid IGA-FEA simulations, our model can create real-time (0.93 s) and truthful (99.89% accuracy) results. The effectiveness of the proposed model is demonstrated with several complex design examples. We believe the presented workflow effectively combines IGA, FEA, ML, and 4D printing to provide a powerful computational tool that enriches the 4D printing design tool box, and brings huge application potentials.