Using machine learning to examine preservice teachers’ perceptions of their digital competence

. This research paper’s aim was to investigate both the pre-service teachers’ perceptions of their digital competence and if gender, type of the bachelor’s degree and age made the opinions different or not. To do so, the clustering analysis method was employed to analyze the areas and items of the digital competence questionnaires used as a data collection technique. The study group included 291 participants who are now teacher-trainees in Draa-Tafilalte Regional Teacher-Training Center in Errachidia and Ouarzazate in the south-east of Morocco. In so doing, a number of results attained and basically confirmed that the level of the teacher-trainees’ digital competence was low or weak and that the three parameters (the type of the bachelor’s degree, gender and age) played a significant role in shaping different opinions on their digital competence. This paper ended with some major implications that were drawn from the findings of this study in our bid to highlight some needs of the pre-service teachers that should be met in their training courses and related activities to develop their digital competence in teaching and learning process.


Introduction
Nowadays, no one can deny the fact that technology has dominated our lives from the very outset of this third millennium or so and becomes an indispensable part of our daily life.So, no one can keep up with the developments of this century without being at least an average computer-literate.The same can be said in the field of teaching, teachers are all invited to learn how to employ the latest technologies used in teaching and learning operation since it hugely contributes to improving teaching practices and styles and helps them to always keep abreast of the developments that this field witnesses ceaselessly (Williams, et al. 2004).
The integration of technology into education is a sole guarantee that would make teaching and learning process successful (Sang et al. 2010) because it facilitates teaching activities for teachers and students and lessen the burden for them.We should mention at this point that there is a correlation between the use of technological devices and motivation.In other words, motivation has a direct relationship with technologybased instruction for students and teachers and their academic achievements and the improvement of their teaching practices and styles.Some studies confirmed that relationship by having reached the fact that the teachers who use technology are always ready to spend more time in class thanks to the enjoyment and lightheartedness of the teaching activities they devised with technological devices and computer programs (Vongkulluksn et al. 2018).We deduced from the literature that digital competence is unavoidable if we want to hone our skills and practices, especially in learning and teaching process.
For the different dimensions of digital competence, it has been very clear from the literature that one or two digital competence-related areas have extensively been assessed (A.Çebi, İ. Reisoğlu, 2020).Apart from very few research studies that have often done in some countries across the globe, all other dimensions of the digital competence have so far been ignored by many studies conducted in this domain (Ibid).Consequently, the field needs studies which completely and thoroughly investigate the teacher-trainees' level of digital competency and related deficiencies to specify their perceptions and needs.These studies should also highlight the areas in which their digital competences vary according to variables like gender, age and type of the bachelor's degree, etc.
In the same vein, the digital competence-related deficiencies or shortcomings should be identified with the purpose of making some illuminating proposals or suggestions from the nature of these spotted deficiencies so as to enrich training courses teacher-trainees take in teacher-training centers as a first step towards helping them improve their teaching practices.In this way, the digital competence-related deficiencies which could be identified would appropriately be addressed and exploited to draw up effective strategies to develop their digital competence.The effectiveness of the suggested solutions entails that studies, dealing with this subject, must be done within each country because the policies adopted in each country with respect to teacher training programmes are quite different.So, the necessary steps and initiatives should be taken by any country to meet its needs in this field.
To our best knowledge, the researches conducted on such a topic have been rare in Morocco and as a result research about the digital competence of pre-service teachers has been terribly needed and how the intervening factors as age, gender, and the like come into play.As long as digital competence is an integral part of the teaching and learning operation in this century, it should be integrated into pre-service teacher training.In other words, if we want the educational system to keep up with the ever-changing prerequisites of teaching and learning, the current pre-service teacher training programs should enhance the teacher-trainees' digital competence.From our experience as Computer Studies teacher-trainers and from some studies carried out on this subject, we feel that teacher-trainees' level of digital competence should be further explored and elaborated to see how digitally competent they are and to gauge the effect of some intervening factors on their digital competence.
In accordance with this fact, the present research paper, in our contribution to this field, aimed to explore the relevance of digital competence in teaching and how the teacher-trainees perceived its importance in their future teaching jobs and to what extent they mastered it.To evaluate this, we focused on how the teacher-trainees perceived their digital competences and the variables that could intervene and make their opinions about it vary.

Research sample
The study group composed of 291 teacher-trainees from the two institutions of Draa-Tafilalat Regional Teacher-Training Center; one based in Errachidia and the other in Ouarzazate.It is note-worthy at this point that the number of the participants might be unrepresentative across Morocco because the number was very limited and the subjects were only from Draa-Tafilalte Regional Center for Education and Training as mentioned above.However, this study could be complementary to other rare research papers some Moroccan researchers carried out before on this particular subject to broaden the scope of research and (re)explore and (re)investigate more variables that might be indispensable for developing digital competences of Moroccan pre-service teachers and practicing teachers.So, we conducted the research within the framework of the data garnered from the digital questionnaires we administered via social media outlets to 291 teachertrainees of the two cycles of our educational system, primary and secondary.To indicate, 50 questionnaires were excluded because they were not filled out properly.For the gender question, female participants made up (49%) of the subjects of the study and the remainder (51%) were male participants, (n= 118) and (n=123), respectively.The average age of the teacher-trainees was, as calculated, 31,63.For the branches of the members of the study group were broadly: Letters/ Arts and Science.However, they are all bachelor holders (Sociology, French, Arabic, Physics, Mathematics, Islamic Education…) and they all graduated from different Moroccan universities.

Aim of the Study
The sole purpose of this study was to investigate the perceptions or opinions of the teacher-trainees on their level of digital competence and how the three variables (gender, the type of the bachelor's degree and age) influenced their opinions and competency.To analyze the responses collected by the aforementioned questionnaires, we used the clustering analysis method to clearly and sufficiently analyze and discuss the items in consistency with the determined purpose of the present paper.
So, we got the answers to the following research questions and we did discussion and interpretation of the results we reached: 1-How do the pre-service teachers perceive their digital competence?2-Do variables, gender, type of the bachelor's degree and age, play a certain role in making the pre-service teachers' opinions about their digital competence vary?

Clustering Analysis
This analysis tool is, as Ferreira and Hitchcock (2009) explained, was employed to discover the previously unknown relationships between objects and reduce the number of dimensions and to determine the outliers.Put it differently, cluster analysis is a type of Unsupervised Learning technique used to find commonalities between data elements that are otherwise unlabled and uncategorized.The goal of clustering is to find distinct groups or "clusters" within a data set.Using a machine language algorithm, the tool creates groups where items in a similar group will, in general, have similar characteristics to each other.To indicate, a good clustering method produces high quality clusters with high intra-class similarity and low inter-class similarity.Moreover, the quality of a clustering result depends on both the similarity measure used by the method and its implementation and also the quality of a clustering method is measured by its ability to discover some or all of the hidden patterns (Mark Ryan M. et al. 2015).From this, we could define it as putting objects/things into their natural clusters/groups depending on their similarities and common points.In general, this tool has three popular clustering techniques: Hierarchical Clustering analysis and Non-Hierarchical Clustering analysis and K-Means Clustering.The objective of this analysis (clustering analysis) is to identify patterns in data and express their similarities and differences through their correlations (Ibid).In the present study, we used a method that MacQueen proposed in 1967 so as to divide a universe with N number of dimensions into k number of clusters.The latter, In the K-means algorithm, consisted of a random point and were integrated in the clustering.From this, we used k-means since it has been the most common method used in nonhierarchical clustering analysis.Each universe was assigned with the closest mean and this mean for that group was re-calculated given the new universe as McQueen contended (1967).

Data Collection Tool
The data collection technique used in this scientific article was a digital competence questionnaire.This data collection tool has been developed by researchers on the DigComp framework.Five dimensions of digital competence were included in the questionnaire.These five dimensions were as follows: "Information and data literacy", "Communication and collaboration", "Digital content creation", "Safety", and "Problem-solving".The development of this went through the rectification and testing process after having been devised on a guide for DigComp prepared by Carreto et al. (2017) to see how suitable it would be for the purpose of our research questions.Some experts major in digital competence were asked to judge if the questionnaire's scope and expression and design were experimentally proven and acceptable.Based on their feedback, some changes were made to some specific items.To be sure if the language used in it was straightforward and clear, I asked an expert in French language to check if the form was linguistically correct and understandable.The questionnaire was a 6-point Likert-type varying from 1(= I need more knowledge about the subject) to 6 ("I have strong knowledge about the subject").

Findings
To reiterate, the study's purpose was to know the opinions of the teacher-trainees on their digital competence and to determine whether these opinions were different owing to these three variables: gender, type of the bachelor's degree and age.
By and large, it was obvious from the data the questionnaires contained that the teacher-trainees' average response to the items of the categories "information and data literacy" and "communication and collaboration" was 3.2 and above.The opposite remark was made for the items of both "digital content creation" and "problem-solving" in the sense that they had a relatively lower response average than the first ones.For the area of "problem-solving", we recorded the lowest average as per "I solve the technical problems I encounter when using digital media and devices".The mean and SD of the latter item stood at M=2.86; SD=1.13.From the means of the items of the area "Safety", we concluded that the teacher-trainees generally paid attention to their and others' privacy and personal data meanwhile the mean score of their opinions on the item "awareness of the effects of digital technologies on health and environment" went high.As opposed to the latter, from the two items of this area, we found them to be relatively low and the items were: "I know how to deal with online threats" and "I take different measures to protect my digital device and content" and their scores and SD were (M=3.17;SD=1.12) and (M=3.41;SD=1.09), respectively.
From this brief analysis and evaluation of all the item averages, it seemed to us that the teacher-trainees' digital competence was less than average.
However, the logical analysis required to detail the respondents' answers in the questionnaires in order that we could come up with a clear full picture about the teacher-trainees' digital competence and about the three variables we singled out to be included in compliance with the requirements of the goal of the present research paper.Thus, the following section was divided into three subsections; the first one was devoted to the descriptive statistics and the second to k-Means clustering and the third one to the demographic features and academic backgrounds of the teacher-trainees.

Descriptive statistics
The following table summarized numerically the questionnaires regarding teacher-trainees' digital competency: As its title explained, Table 1 showed the mean scores, standard deviations and correlations in relations to variables (IDL, CC, DCC, SAF and PS).From the descriptive statistics' results, we inferred that the teacher-trainees' mean score was the lowest in PS (M= 2,864; SD = 1,134) while in CC, the highest mean score was recorded (M=3,393; SD = 1,148).Also, it was very clear from the first examination of the results of the other variables that the scores were a little bit higher than the mean: IDL (M= 3,228; SD=1,175), DCC (M=2,962; SD1,152), and SAF (M=3,086; SD=1,141).

K-means clustering
For further illustration of clusters, the following bar graph was plotted to display the mean of the cluster centers that the k-means analysis formed: As could be seen in Fig. 1, the respondents were split, within the K-means cluster analysis into three clusters according to their responses to the digital competence questionnaire items.To scientifically analyze the data, we determined for each variable the mean in the cluster and we conducted one-way ANOVA to confirm the effective difference between the groups.
Additionally important, some significant differences between the clusters were revealed thanks to the Bonferroni post hoc analysis.This might be due to each factor that had influence on the members' acceptance of the study group.
Specifically speaking, the number of the members of the three clusters, as seen in Table 2, varied from 59 (Cluster 3) to 93 (Cluster 1).Given the teacher-trainees' strong and weak items, the areas were labeled as mentioned above (see Data collection tool section).
Cluster 3 represented the teacher-trainees who had the lowest scores for the areas: IDL, CC, DCC, SAF, and PS (n=59) whereas in Cluster 1, the scores of the areas were neither strong nor weak.This meant that, for Cluster 1, which was the biggest group (n=93), the means were below zero (negative), and this result confirmed that the teacher-trainees' performance with respect to all the digital competence areas were rather weak.All the cluster members needed more training in this to be quite qualified in digital competence.It was observed, for Cluster 1, from the areas that the highest score seen in communication and collaboration (CC) area (-0,064) and the lowest was spotted in the area of problem-solving (PS) (-0,297).From the means of the these two clusters, it could be concluded that the teacher-trainees were in dire need of specialized training in Information and Communication Technologies (ICT) so that they could do their best in teaching and learning process.
For Cluster 2, the areas were, on the contrary, very good and their means were all positive (IDL: 0,851, CC: 0,922, DCC: 0,843, SAF: 1,004, and PS: 0,984.Simply put, In this cluster (n=89), the teacher-trainees had the highest scores for (SAF) (1,004) and problem-solving (PS) (0,984) among all the DC areas.In the same cluster, the lowest recorded score belonged to digital content creation (DCC).It was observed that the members of the cluster were weak in information and data literacy (IDL) area which was necessary, as other areas, for many purposes as searching for data, information or digital content in online environments, etc (see the questionnaire).

Demographic characteristics and academic background of the teacher-trainee
Table 2 showed the difference between the cluster groups in terms of gender, type of bachelor's degree (Sciences or Letters/Arts) and age.To deepen our understanding, not only did we compare in the study the socio-demographic features of the three clusters in terms of gender, type of bachelor's degree and age but also we employed Chi-square to spot differences if they existed.In fact, the results showed a statistical difference in the k-means distributions of the respondents' gender, type of bachelor's degree and age in the clusters/ groups.
Statistically speaking, the number of the female teacher-trainees, as could be observed from the table, was large in Cluster 3 (38,14) but their male colleagues made up the vast majority in Clusters 1 and 2 (39,02) and (46,34%), respectively; however, we could say that some sort of balance was seen in Cluster 1 (39,02% for males and 38,14% for females).Another observation could be made in terms of the teacher-trainees' type of bachelor's degree: those who held Bachelor's degrees in scientific categories (Mathematics, Physics, Chemistry, Earth-and-Life Sciences…..) were the majority of the respondents as the table devoted to this variable showed.The teacher-trainees, who major in Sciences, were 136 out of 291.For the last variable (age), we recorded that the respondents whose age ranged from 21 to 25 were the majority in cluster 1 (63%) while the two categories of 26 to 30 and 31 to 35 dominated Cluster 2 (44 % for both), but in cluster 3, those who were 41 to 45 were the majority by 58 %.

Discussion and conclusions
As already mentioned, we aimed to know how the pre-service teachers perceived their digital competence and see whether gender, branch and age had any kind of impact on their perceptions and conceptions.It was worth-noting that it could be inferred from the results attained in this research paper that the pre-service teachers' digital competence item responses to the areas of digital content creation (DCC) and problem-solving (PS) were lower while the digital competence item responses to the areas of information and data literacy (IDL), communication and collaboration (CC), and safety (SAF) were higher.
The use of the digital technologies by the majority of the pre-service teachers on a daily basis could be enough evidence that could explain why they felt more competent/ advanced in the areas of information and data literacy, communication and collaboration, and safety.However, it was reached, in related research, that pre-service teachers felt that their level of competence in the areas of the digital content creation, safety and problem-solving was still low.
As compared to other digital competence knowledge and skills, it was found that the teacher-trainees' knowledge and skills had a lower average in terms of developing content in simple forms employing digital technologies and solving technical problems when they used digital media and devices.And this finding might be attributed to the predominance of the theoretical knowledge in teacher training programs at the expense of real practice for the content development and technical problems.
These inferences we made from the digital questionnaires were in agreement with what some researchers contended, especially (Gutiérrez-Porlán & Serrano-Sánchez, 2016), that this kind of teachers were competent enough in some informatics-related techniques; namely, searching, screening and assessment, storage, and organizing while they were less competent in digital content creation, its integration, copy-right and licensing (Napal-Fraile et al., 2018).It remains to note that their competencies were good too in both securing protection against devicesoriginated threats and in raising their awareness of the digital technologies' effects (physical, psychological and environmental).So, we could say that the results reached so far were in consistency with those stated in the literature.
From the questionnaires, it was clear that the variable "gender" had some sort of bearing on the preservice teachers' digital competency.It was concluded that the male pre-service teachers were more competent than their female counterparts in terms of information and data literacy, digital content creation, safety, and problem-solving.Simply put, the males outdid the females not only in data and digital content-related information, identifying and accessing information, and data literacy but also in making changes to ready-made content and in developing content in simple forms in the field of the digital content creation.
Also, in the area of online safety, the male counterparts did better than the females in protecting their digital devices and numerical contents by taking safety and privacy procedures.The fact that males had higher competency than female colleagues was more evident in the problem-solving too; i.e, the male preservice teachers overachieved the female ones in using different digital techs.to create innovative solutions and new developments to diagnose and overcome the obstacles they came across while using technical devices, and this males' ability was related to their nonstop development of their digital competence thanks to the fact that they were more interested in using digital technologies.
We concluded that the results achieved at this stage were empirically useful and appropriate and they were in accord with what has been stated in the literature in terms of the differences between male pre-service teachers and their female counterparts.For example, Keskin and Yazar (2015) confirmed in their research that male teachers were so highly qualified in basic computer use and in garnering bits of information in digital media.Keskin's and Yazar's conclusion was espoused by Esteve-Mon et al. ( 2020) by stating that female pre-service teachers were less competent than their male colleagues when it came to sorting out technical problems and programming.In literature, it is crystal clear that Keskin's and Yazar's inference has been confirmed by many researchers as, to name but a few, Casillas-Martín et al., 2019; Guillén-Gámez et al., 2020 who came to the conclusion in their research papers that male pre-service teachers generally had higher digital competencies as compared to their female colleagues.
Along with this fact, another difference was identified between the pre-service teachers and their colleagues specialized in Science.The main result reached in this paper was that the Science students were so competent digitally in nearly all areas than their colleagues , male or female, from the other branch (Letters/Arts).This fact was confirmed in information and data literacy by their outperforming their colleagues major in Letters/ Arts, especially in using searching strategies to access information, data and digital content.It could also be said that in the area of communication and collaboration they were, no doubt, able to better use digital technologies to work online collaboratively than their Arts/ Letters colleagues.
The higher competency the Science teacher-trainees -those who held Bachelors of Sciences-had in the areas of digital content creation, safety and problem-solving was very clear.For the first area (digital content creation), it was inferred that they were better in using digital technologies to develop simple, different forms of content, change ready-made content and create digital content.For the second one, they were better, too, and more aware than their fellows (in the branch of Letters) of the footprint they left during their online navigation, they also knew how they searched in virtual environments while creating a digital identity and the potential online threats they could face up and how to tackle them.For the third one, they outperformed them in this area as well when it came to recognizing and locating the causes and solve the problems that could crop up when their using digital media and devices.In fact, they sorted out the problems innovatively and skillfully using different digital technologies.Their outperformance might be attributed to varied courses they take on digital competences in the curricula devoted to them at university as students majored in Sciences.In the literature, Çebi and Reisoğlu (2019), for instance, asserted in their research paper that the Science pre-service teachers were far more competent than their colleagues from other branches in the lower areas of digital competence, and this made it clear that the results attained were almost in line with the literature.
For the pre-service teachers' age as the last variable to be elaborated and discussed, important differences were determined in all areas of digital competence and between the three clusters.For cluster 3, their digital competence was very weak and this might be due to their age; they were all over fifty years and maybe they did not study computer studies in their school life and university life.On the other side, we observed that cluster 2 achieved higher score as regards digital competence, and this might be attributed to their agethey are younger-and to the fact they were given a number of courses in Computer Studies in their school life from primary school to university.The what was said about the latter cluster could be said about Cluster 1; however, Cluster 2 was the best and most balanced than the two previous clusters.
It is worth noting that for Cluster 2, the effect size was large in doing actions; namely, in these two areas: digital content creation and problem-solving.The effect originated from the items related to: the digital content creation and production, the development of content in varied formats using digital technologies, and the changes made to ready-made content.
In short, the impact of the variable "age" was not the same in such a way that it had a huge impact on the fields related to the problem-solving, the identification of the causes and solutions to the problems met while using either the digital media and devices or digital technologies for innovating solutions or when boosting their digital competences by embracing the latest in this field.
All in all, it was evident that the results we achieved in this study were in tune with other ones attained by a host of researchers who investigated and explored similar points in the literature.Among them, Napal-Frail et al. ( 2018) who concluded in their research that the master's degree pre-service teachers believed that they were not sufficiently competent in developing digital content and fuse different contents while Insterfjord and Munthe (2017) clarified that pre-service teachers' current digital competence in developing digital content was expected to be better in the internship schools.In 2016, Røkenes and Krumsvik suggested that the preservice teachers should go on courses on the digital content creation to develop and hone their knowledge and skills in these items and others.Taking into account these studies and others not mentioned in this paper and the results we achieved in it, it could be noted that the pre-service teachers were in dire need to be trained on developing digital content in particular and other computer-related techniques in general.
By comparison, the results reached by some previous works and the ones achieved in this paper were tabulated in the following chart to display the complementarity of these works.We restricted our comparison to only the studies carried out by M.

Limitations and suggestions
As any study, our article had a handful of limitations and among them: the number of the participants was limited (N=291), the quantative data were only utilized without qualitative ones, and the possibility of the under-reporting of the data on the part of the subjects of the study, the problems of online self-assessment, the problem of over-or underestimate their real digital competence, etc.Also, due to the data collected through the questionnaires and the techniques and models used, we evaluated the results attained through the analyses that were done on an item basis and this was, in fact, another limitation we encountered in our survey.Thus, it seemed useful to resort to the measurement studies so that we could cover the studied areas of the digital competence in future studies and, as a result, the research based on the cause-effect relationship could be conducted when generalizable results could be reached in terms of digital competence.
Further, the results attained in this current study made it clear that the pre-service teachers were invited to further develop their competencies in the areas of digital content creation (DCC) and problem-solving (PS) in particular and other areas in general.In tune with this inference, the knowledge and skills, which were needed especially to be further developed in specific training programs devoted to their digital competence, were as follows: developing content in simple forms using digital technologies and sort out technical problems when using digital media and devices.
Additionally important, the following aspects should have been taken into consideration: the information, data, needs to be specified to access digital content, changes to be made to the ready-made content, measures to be implemented to protect the digital devices and contents, the safety and privacy related measures to be taken in the online environment, the causes to be identified and solutions to be created, and various digital technologies to be used for innovating solutions to develop digital competence issues or concerns of the current and future teacher-trainees.
In a nutshell, the training courses, which are currently given to the pre-service teachers in the training centers should include the development of digital competence as the main part of the curricula of the training process with the aim of helping them develop fairly their competences in: 1-using digital technologies in cooperative work, and in various simple forms of content development; 2-using information search strategies to access information, data, and digital content in an online environment; 3-creating digital content through making changes to the ready-made content; 4-being conscious of digital footprints they leave when they browse to protect themselves from any potential danger; 5-paying ample attention when they create a digital identity or profile in online environments; 6-knowing how to deal with possible online threats that are likely to crop up at any moment; 7-finding the causes of the technical problems they meet when using digital media and devices and possible solutions to them; 8-creating solutions in an innovative fashion by using different digital technologies; Moreover, the teacher training programs of different branches and specialties and cycles may be rich and interesting if they include practical courses and activities to better develop the knowledge and hone the skills of the pre-service teachers' digital competence.This can be done, for example, by instructing them, in teaching practice courses, to devise appropriate tasks to develop their technology-enhanced teaching competence.In this way, the pre-service teachers are likely to be fairly competent enough to integrate technology in education as a means for more comprehensive transformation of pedagogical-didactic practices so that their teaching styles could be effective and efficient and thus guaranteeing the construction of useful pedagogical knowledge for practice and improvement of students' learning.

Table 1 .
Mean Scores, Standard Deviations and Correlations.

Table 2 .
gender, type of bachelor's degree (Science or Letters/Arts) and age.
Benali et al.'s works because of the dearth of research on this topic in Morocco: