Predicting primary and middle-school students’ preferences for online learning with machine learning

well-being and academic performance has been a subject of concern. Furthermore, the shift to online learning has also necessitated changes in assessment methods, with many educational institutions opting for Background: The COVID-19 pandemic has brought attention to student psychological wellness. Because of isolation, lack of socialisation and intellectual and physical development from excessive media use, primary and secondary school students are at high risk for health problems. Aim: This study aimed to identify the most effective machine learning model for predicting the offline and online instructional strategies students would choose during a pandemic. Setting: The study was carried out at a number of primary and middle schools in Hyderabad, India. Methods: We evaluated the data using machine learning methods such as logistic regression, K-nearest neighbour (KNN), decision trees, bagging and boosting using the Python programming language. Results: In this study, 414 instances were collected from different schools. Exploratory data analysis showed that few students chose online courses. According to the research, very few students choose online classes, and the majority of students favoured offline classes over online because of physical and mental health difficulties; online education effects include a lack of social and peer relationships that affects young children psychologically, and they may not be disciplined enough to resist internet diversions. Smartphones, laptops, etc., affect their vision, causing headaches and impaired eyesight. Conclusion: The KNN was the most accurate machine learning algorithm, with 92.13% accuracy to fits the data to identify the preferences of online education. Contribution: This article examined the perspectives of primary and middle-school children on online education. Most students in this survey also reported experiencing mental or physical health issues that made online education difficult for them. Machine learning algorithms were applied to identify the most effective model for predicting students’ online and offline study preferences. This machine learning method will help schools improve their course delivery methods, allowing students to continue their studies without interruption.


Introduction
In recent years, advancements in technology have revolutionised the field of education, offering students a range of learning methods to choose from.However, COVID-19 pandemic has further accelerated the adoption of online learning as schools and educational institutions have had to adapt to remote teaching and learning environments.This unprecedented situation has brought to light the importance of understanding student preferences regarding learning methods, particularly the shift towards online modes of instruction.The pandemic has posed unique challenges for students, with varying access levels to technology and resources at home.Some students have embraced online learning as a convenient and flexible option, while others have faced difficulties adjusting to the virtual classroom environment.

Predicting primary and middle-school students' preferences for online learning with machine learning
Read online: Scan this QR code with your smart phone or mobile device to read online.
online exams.Understanding student preferences regarding online or offline modes of examination is crucial in ensuring fair and effective evaluation processes.This study aims to identify the most effective machine learning model for predicting student's preferred learning methods, explicitly focusing on the dichotomy between online and offline learning modes.This research becomes especially relevant in the context of the COVID-19 pandemic, where traditional inperson learning has been disrupted, and online learning has become a prominent alternative.By leveraging the power of machine learning algorithms, this research aims to uncover valuable insights into the factors that influence student preferences for online or offline learning.The analysis will encompass 414 online and offline students, utilising Google Forms and a questionnaire and direct contact with students to determine the impact of the lockdown on the children's education, health, social life, attention and other areas.
This study seeks to bridge the gap between student preferences and educational offerings by identifying the best machinelearning model for predicting whether students prefer online or offline learning methods.In the context of the COVID-19 pandemic, understanding student preferences becomes even more crucial as the education landscape continues to evolve.

Reviews
A study informs that the government imposed a lockdown because of COVID-19, which negatively impacted several sectors, including income, education and so forth (Zhou & Kan 2021).According to a study, students in lockdown accepted online learning, and most desired to continue taking classes online even in an epidemic (Zheng et al. 2021).The study says that online education is a relatively new teaching method and to increase students' interest in it.Some tactics, such as encouraging and assisting students, can be used (Shuanglan Luo & Xueqin Huang 2012).A study briefed that the majority of students preferred to complete their coursework online to fit their schedules, but many curriculum streams are practical in nature and cannot be completed online (Muthuprasad et al. 2021).A study shows that online education is a good option and helpful in pandemic situations (Allo 2020).A study suggests that the best way to teach students during a lockdown is an online mode, which allows teachers to teach everything from home using videos, PDFs and other tools (Jena 2020).One more study says that online instruction can be carried out even in the most challenging circumstances because the notes, resources and recordings of classes can be consulted at any time and in the comfort of one's home (Ayebi-Arthur 2017).
A study notifies that various online platforms offer materials like notes, PDFs, etc., and various exercises and assignments where students can independently understand the language (English) (Anggaira & Aryanti 2021).Another study brief that students used to experiment with various teaching methods from various institutions during lockdown to learn more about the subject.Social media is the most significant diversion in online learning (Affendy, Ayi & Basir 2022).A study informs that students will show more interest when online courses are highly interactive with teachers and students, such as through discussions, quizzes and other activities (Arbaugh 2000).
A study describes that, although the students dislike online classes, they have accepted the pandemic situation and kept taking them despite the struggles (Valizadeh & Soltanpour 2021).A study specifies that students supported web-based learning during the lockdown, and most of them all came to the class using their mobile devices.When comparing interest in online activities by gender, female students demonstrated greater interest than male students (Vinayachandra et al. 2021).A study explains that it is not like every student is fit for online education.Teachers should identify their students' strengths and weaknesses regarding online learning strategies and create courses that will enable every student to grasp the material (Kauffman 2015).A study describes that if the instructions and guidelines for the system are clear, the student will be able to understand the online classes' course (Tetyana Rios, Marquita Elliott & Jean Mandernach 2018).
Another study says that more students use mobile data to listen to online classes.Students were engaged in various academic activities like assignments and tests after each class.Future class information has been updated on social media platforms (Omar et al. 2021).
According to one survey, all resources, instruction, tests and exams are given online, which is the more efficient format for the students.Because of the pandemic, there was no longer any transportation between homes and schools, allowing students to spend more time on their studies (Darius, Gundabattini & Solomon 2021).A study specifies that students who participate actively in online classes interact with their classmates, demonstrating the strong correlation between students in online education (Fatima Afzal & Lynn Crawford 2022).A study indicates that mothers in lockdown dedicated more time to household and children's educational tasks than other family members (Xue & McMunn 2021).A study explains that students during the pandemic are less dependent on teachers and more dependent on family members and technology, so these online classes are bridging the knowledge gap for the students (Goudeau et al. 2021).A study specifies that students can easily understand concepts using various tools during online lessons.This study also shows that teachers and students can be encouraged to use online tools even after the COVID-19 situation (Pokhrel & Chhetri 2021).
According to a study summary, online education teachers and school administrators will encounter numerous difficulties (Kitahara & Westfall 2007).Another study suggests that students are uncomfortable with the new online teaching methods, and the benefits of taking classes online are not as great as their drawbacks (Nguyen 2022).
A study explains that online classes were very helpful in the corona situation, but there were various challenges, such as poor internet, power outages, etc. (Safura 2021; Alaidaros et al. 2021).Another study suggests that urban students find online learning much simpler than rural students because urban areas are more developed and students have better technology accessibility (Bast 2021).A study shows that female students use their phones more frequently than male students.But even so, mobile devices have negatively influenced students, causing male students to lose focus and self-control while causing female students' behaviour changes (Nayak 2018).
Another study notifies that COVID-19 is the reason that many students have left school (Kuhfeld et al. 2020).A study informs that students' communication skills have decreased because of online classes.Students are no longer confident and have trouble understanding materials found online (Alawamleh, Al-Twait & Al-Saht 2020).A survey indicates that teachers' e-learning teaching was below expectations.The students were content with the online classes but were not happy with how well they learned the material (Syauqi, Munadi & Triyono 2020).A study informs that students are not satisfied with the tests and exams that were given online, even though they received good grades and excellent test results (Hussain et al. 2020).Also, another study demonstrates that online classes are not interactive, and taking them for longer than 10 h can have serious health effects (Chandra et al. 2021).A study reviews that online learning has a detrimental impact on students, with depression and anxiety being the main effects.The government sector can act to provide students with the necessary equipment and internet access at a low cost during the pandemic (Agung & Surtikanti 2020).

Materials and methods
The data for the proposed study was gathered in two ways: (1) online using Google Forms and (2) offline using a questionnaire and direct contact with the students.The survey was done with safety and preventative measures in mind.The collected data were processed for analysis using Python.We employed plots and graphs for data visualisation.Machine learning methods were used to get insights from the investigation.

Statistical analysis
Data preprocessing is a phase in the data extraction and evaluation process that converts raw data into a format that computers and machine learning algorithms can interpret and analyse.The collected data consist of categorical variables.In the first step, before analysing the data, we converted categorical data into numeric data in the data preprocessing step.We only considered around 26 of the 28 characteristics in our data, and we did the following transformations: • Two-variable columns have been replaced with 0s and 1s.
• Columns with five variables, such as excellent, very good, good, fair and poor, have been reduced to three variables, better, good and bad.
• By using the dummification technique, the columns with three variables have been transformed into 0s and 1s.• According to the replies in the columns having check boxes, students who have picked one choice are placed in one category, while students who have selected several options are placed in a different category and converted to 0s and 1s.
After this procedure, the number of columns increased to 75; thus, we selected 56 of those 75 columns that were considered for analysis.
The data was analysed using Python, which is a programming language that can be used for powerful statistical analysis.The essential questions were considered and analysed using machine learning techniques as per the data collected using a questionnaire.The machine learning techniques thatwere implemented were: We used the metric accuracy to compare the machine learning models that we have implemented.The higher the accuracy, the better the model.Accuracy is the ratio of correct predictions to the total number of predictions.

Results
According to the data, male responses comprised 50.24% of the total responses, while female responses comprised 49.76%.The students come from various communities: 25.12% are from rural regions, 76.46 are from urban areas and the remaining are from peri-urban areas.When we look at responses by class, class 1 had a response rate of 2.42%, class 2 of 5.31%, class 3 of 6.52%, class 4 of 6.52%, class 5 of 4.83, class 6 of 24.64%, class 7 of 25.60% and class 8 of 24.15%.Considering the parent's income, 39.13% of kids said their parents' income was sufficient, 15.46% reported that it was insufficient and 45.41% reported that it was just partially enough.
From Figure 1, we can examine the correlation between the gender of the pupils and the frequency with which they desired that the school perform its classes.Male students who wanted daily lessons were somewhat more numerous than female students.The kids were all equally interested in the morning classes.
We can see that most male and female students wanted lessons to be held every day.While classes that met once a week or twice a week had similarly less interest from both males and females.
http://www.sajce.co.zaOpen Access In the plot (Figure 2) in the X axis: • 0-Able to pay attention to classes • 1-partially able to pay attention to classes • 2-Not able to pay attention to classes In the plot (Figure 2) in the Y axis: • 0-No health issues • 1-facing health issues The graph in Figure 2 displays the interaction between students of both genders.According to their health and desire to attend online classes, students with excellent health could pay attention in class, but those in poor health could pay less attention.When we look at both genders, we can find that females in excellent health were better able to pay attention than males, but men in poor health were still able to do so.
In Figure 3, we can see that the majority of students have opted for offline classes, whereas a minority of students have opted for online classes.
In K-nearest neighbours (KNN), we are trying to determine the optimal number of neighbours, which would help us get results with the best accuracy possible, so we have implemented cross-validation in KNN to determine the optimal number of neighbours, leading to good accuracy.
The plot in Figure 4 is used to show the relationship between the number of neighbours and the accuracy.We see that we got the highest accuracy when the value of k was 10, where accuracy was 92%, whereas we got the lowest accuracy when the value of k was 30.
Table 1 shows that we have the following percentage accuracies after implementing all machine learning algorithms.We can see that K-nearest neighbour with crossvalidation has the highest accuracy, 92.1%, and among all machine learning algorithms, the lowest accuracy we got was for decision tree and bagging, which is 67.2%.

Conclusion
We can observe that survey participation was equally split between the males and females.According to students' opinions, the majority of them preferred daily offline education.Owing to health and concentration concerns, the majority of students chose offline classes; nevertheless, because of the lockdown, offline instruction was not possible.Additionally, students encountered significant difficulties when taking online exams since they lacked comprehensive notes and resources.The course's material has been condensed, which has greatly aided students' learning but has also lowered their understanding of how to grade their classes.Teachers also praised students for their excellent study habits throughout that difficult time.Our dataset's best-performing machine learning model was KNN with cross-validation.
By utilising cutting-edge technologies like machine learning, we can comprehend the conduct and circumstances of the children.
Although every student has tried their hardest in COVID, online education is still new to them.Because of the lengthy online sessions held in one home, all students were stressed.As a result, the majority of students have chosen the offline option, and they are pleased that the schools have reopened.

TABLE 1 :
Comparing different machine learning algorithms.Plot of gender versus how often classes required.