Wire and arc additive manufacturing (WAAM) is a promising technology for fast and cost-effective fabrication of large-scale components made of high-value materials for industries such as petroleum and aerospace. By using robotic arc welding and wire filler materials, WAAM can fabricate complex large near-net shape parts with high deposition rates, short lead times and millimeter resolution. However, due to high temperature gradients and residual stresses, current WAAM technologies suffer from high surface roughness and poor shape accuracy. This limits the adoption of these technologies in industry and complicates process control and optimization. Since its conception, considerable research efforts have been made on improving the mechanical and microstructural performance of WAAM components while few studies have investigated their geometric accuracy. In this work, we propose an engineering-informed machine learning (ML) framework for predicting and compensating for the geometric deformation of WAAM fabricated products based on a few sample parts. The proposed ML algorithm efficiently separates geometric shape deviation into deformation and surface roughness. Then, the predicted shape deformation of a new product is minimized by applying optimal geometric compensation to the product design. Experimental validation on cylindrical shapes showed that the proposed methodology can effectively reduce product shape deviation, which facilitates the widespread adoption of WAAM.