Massive open online courses (MOOCs) have evolved rapidly in recent years due to their open and massive nature. However, MOOCs suffer from a high dropout rate, since learners struggle to stay cognitively and emotionally engaged. Learner feedback is an excellent way to understand learner behaviour and model early decision making. In the presented study, the authors aim to explore learner sentiment expressed in their comments using machine learning and multi-factor analysis methods. They address several research questions on sentiment analysis on educational data. A total of 3311 messages, posted on a MOOC discussion forum, were analysed and categorized using machine learning and data analysis. The results obtained in this study show that it is possible to perform sentiment analysis with very high accuracy (94.1%), and it is also possible to periodically supervise the variations in learners' sentiments. The results of this study are very useful. In the context of online learning, it is very beneficial to have information about learner sentiment.