Crude nyamplung Calophyllum inophyllum is a potential non-edible feedstock for biodiesel production. Calophyllum Inophyllum oil (CCIO) is a non-edible oil that has a high content of triglyceride (TG) and free fatty acid (FFA). This study aims to optimize microwave-assisted power and extraction time of triglyceride purification from C. inophyllum crude oil for biodiesel. This work deployed Artificial Intelligence (AI) algorithms consisting of eight Machine Learning (ML) algorithms and found the most accurate model, then optimized using the Particle Swarm Optimization (PSO) algorithm.The result of machine learning modelling Random Forest achieved higher accuracy in R-Square and lower Mean Square Error (MSE) than any other models. Overall, in R-Square average across all variables was 0.949 ± 0.026 and the MSE average of 0.097 ± 0.068. This result can be interpreted as a mean deviation between the predicted value and an accurate value of less than 0.1 for all variables. The optimum of the TG compound resulted in the power of 462.3 W and time of 39.12 min that equalled at 84.02% and FFA equalled at 6.92%. The TG have increased by 11% from the reference range, which states conventional methods from crude oil. Comparison with the MAE method has a minimum fitness value difference of 0.0006 but has a smaller accuracy of less than 1%. Implementing this prediction and optimization method can shorten the extraction time by 5.8 min and reduce energy consumption or system work by 130 kJ. This method can be used for input parameter model prediction and parameter optimization in purification for biodiesel feedstock. Further research can be carried out using other artificial intelligence methods to optimize biodiesel production.