ABSTRACTThe development of machine learning (ML) technologies is driving changes across many sectors. In industrial settings, this is called the fourth industrial revolution and encompasses several technologies pushing the boundaries of industrial automation. In this study, a general industrial process optimization (GIPO) methodology is formulated in the context of Industry 4.0 and tested on an industrial injection moulding machine (IMM). GIPO aims to encourage the practical inclusion of industrial artificial intelligence at all levels of the manufacturing process, while enabling industrial equipment to adapt to a changing processing environment. Special attention is given to the generality of the methodology so that it can be extended to other applications. In the example case study presented here, GIPO combines K‐nearest neighbours classification and nearest neighbours optimization methods to optimize an injection moulding process effectively. Practical implementation conducted on the IMM demonstrates a novel methodology to leverage data mining and ML methods in a real‐world setting to improve production quality, production time and energy cost.