In nursing education, recognizing and accommodating diverse learning styles is imperative for the development of effective educational programs and the success of nursing students. This article addresses the crucial challenge of classifying the learning styles of nursing students in Morocco, where contextual studies are limited. To address this research gap, a contextual approach is proposed, aiming to develop a predictive model of the most appropriate learning approach (observational, experiential, reflective and active) for each nursing student in Morocco. This model incorporates a comprehensive set of variables such as age, gender, education, work experience, preferred learning strategies, engagement in social activities, attitudes toward failure, and self-assessment preferences. We used four multivariate machine learning algorithms, namely SVM, Tree, Neural Network, and Naive Bayes, to determine the most reliable and effective classifiers. The results show that neural network and decision tree classifiers are particularly powerful in predicting the most suitable learning approach for each nursing student. This research endeavors to enhance the success of nursing students and raise the overall quality of healthcare delivery in the country by tailoring educational programs to match individual learning styles.