Metabolic pathways refer to the continuous chemical reactions in the metabolic process in vivo. Compounds are the major participant for most metabolic pathways. It is essential to determine which compounds can constitute a metabolic pathway. This problem can be converted to the identification of the metabolic pathways of compounds. Although traditional experiments can provide solid results, they are always of low efficiency and high cost. To date, several machine leaning models have been proposed to address this problem. However, almost all models only identified metabolic pathway types of compounds rather than actual metabolic pathways. This study proposed a novel model for predicting actual metabolic pathways for given compounds. The pairs of compounds and metabolic pathways were termed as samples, thereby modeling a binary classification problem. With the concept of "similarity", each sample was represented by seven features, extracted from seven associations of compounds, which measure compound linkages from different aspects. The model adopted random forest as the classification algorithm. Two types of tenfold cross-validation were adopted to evaluate the performance of the model, indicating its utility. A feature analysis was also performed to determine which compound association was highly related to the identification of metabolic pathways of compounds.