
The primary purpose of this paper is to combine optimization and machine learning to extract hidden rules, remove unrelated data, introduce the most productive Decision-Making Units (DMUs) in the optimization part, and to introduce the algorithm with the highest accuracy in Machine learning part. In the optimization part, Data Envelopment Analysis (DEA), which is a scientific modeling method of computing comparative productivities and efficiencies of Decision-Making Units (DMUs) compares productivities with Malmquist Productivity Index (MPI). We apply the DEA evaluation with the abovementioned well-known methods in thirteen pharmaceutical companies for five developing countries over 2014-2019. To find the superior model, we use CCR-DEA (or Charnes, Cooper and Rhodes model), BBC-DEA (or Banker, Charnes and Cooper model), and Free Disposal Hull (FDH) for measuring the performance and efficiency of decision processes. We assess models with financial information from Data-stream, with Research and Development (R&D) investment. R&D expenditures relate to the exploration and progress of a company’s properties or facilities. In the machine learning part, we use a specific two-layer data mining filtering pre-processes for clustering algorithms to increase the efficiency and to find the superior algorithm. The results indicate that the FDH model has the most productive results (in MPI) and the highest accurate algorithm (in clustering) during all periods compare with other suggested models. The BCC-DEA and CCR-DEA models have the second and third place, respectively. Meanwhile, HIERARCHICAL CLUSTERER has the highest accuracy among the eight proposed algorithms.