The layered fabrication approach induces directional anisotropy and impacts mechanical strength of FDM components significantly. This paper proposes generalized machine learning based parameter optimization framework to determine optimal build orientation for FDM components. The algorithm determines ideal build orientation by maximizing the minimum Factor of Safety (FoS) for the component under prescribed loading conditions ensuring its even distribution. An Artificial Neural Network (ANN) coupled with Bayesian algorithm has been employed to accelerate the optimization process. The algorithm begins with an initial sample data collected using brute force approach; uses single layered ANN for approximation and optimization is achieved using Bayesian algorithm. A series of computational experiments considering five different test components has been devised to evaluate the performance and efficacy of the proposed algorithm. These experiments demonstrated that the proposed algorithm can determine the optimum building orientation effectively with certain limitations. © 2020 CAD Solutions, LLC,.