One major impediment to wider adoption of additive manufacturing (AM) is the presence of larger-than-expected shape deviations between an actual print and the intended design. Since large shape deviations/deformations lead to costly scrap and rework, effective learning from previous prints is critical to improve build accuracy of new products for cost reduction. However, products to be built often differ from the past, posing a significant challenge to achieving learning efficacy. The fundamental issue is how to learn a predictive model from a small set of training shapes to predict the accuracy of a new object. Recently an emerging body of work has attempted to generate parametric models through statistical learning to predict and compensate for shape deviations in AM. However, generating such models for 3D freeform shapes currently requires extensive human intervention. This work takes a completely different path by establishing a nonparametric, random forest model through learning from a small training set. One novelty of this approach is to extract features from training shapes/products represented by triangular meshes, as opposed to point-cloud forms. This facilitates fast generation of predictive models for 3D freeform shapes with little human intervention in model specification. A real case study for a fused deposition modeling (FDM) process is conducted to validate model predictions. A practical compensation procedure based on the learned random forest model is also tested for a new part. The overall shape deviation is reduced by 44%, which shows a promising prospect for improving AM print accuracy.