Over the past few years, 3D printing has gained significant attention due to its applications in various fields. Polylactic acid (PLA) is a widely used biodegradable polymer with good mechanical strength. However, the low percentage of elongation, low melt strength, and narrow processing window limit its widespread use in various industries. To overcome these limitations, PLA can be blended with other biodegradable polymers. In this study, PLA was blended with amorphous polyhydroxyalkanoates (APHAs) derived from food waste, to enhance its application in 3D printing. The mechanical properties of the blends were investigated as a function of different printing parameters, i.e., layer thickness, nozzle temperature, and flow rate. To optimize the mechanical performance of the blends, a statistical technique grey relation analysis was used. The optimized parameters for the blend were a layer Thickness of 0.15 mm, a nozzle temperature of 185 degrees C, and a flow rate of 100%. Moreover, the layer thickness was found to have a significant effect on the mechanical performance with a contribution of 53%. There was a significant improvement in the percentage of elongation at the break by adding APHA to PLA (183%) compared to PLA alone, which showed 2.45% elongation at the break. However, in comparison to 3D printed PLA, the mechanical properties i.e., ultimate tensile strength and Young modulus of the blend decrease by 16.5 and 37.8%. Furthermore, a machine learning technique (random forest regression) was used to predict the mechanical properties of the blend. It was found that the prediction model showed an accuracy of 96%. The predicted mechanical properties of yield strength and toughness have the highest R2 values of 0.9965 and 0.96, respectively.