BACKGROUND: Obstructive sleep apnea (OSA) is a chronic sleeping disorder. The analysis of the pharynx and its surrounding tissues can play a vital role in understanding the pathogenesis of OSA. Classification of the pharynx is a crucial step in the analysis of OSA. METHODS: A visual analysis-based classifier is developed to classify the pharynx from MRI datasets. The classification pipeline consists of different stages, including pre-processing to select the initial candidates, extraction of categorical and numerical features to form a multidimensional features space, and a supervised classifier trained by using visual analytics and silhouette coefficient to classify the pharynx. RESULTS: The pharynx is classified automatically and gives an approximately 86% Jaccard coefficient by evaluating the classifier on different MRI datasets. The expert's knowledge can be utilized to select the optimal features and their corresponding weights during the training phase of the classifier. CONCLUSION: The proposed classifier is accurate and more efficient in terms of computational cost. It provides additional insight to better understand the influence of different features individually and collectively. It finds its applications in epidemiological studies where large datasets need to be analyzed.