The Effectiveness of a Personalized Virtual Fitness Trainer in Teaching Physical Education by Applying the Artificial Intelligent Algorithm

Inactivity has been the main cause of obesity which has affected many people worldwide. Studies show that fitness is an important goal for a healthy lifestyle and has been used as a measurement for health-related quality of life. A fitness trainer can motivate and teach users to do fitness activities. However, to use a human fitness trainer may involve high cost and is not suitable for a certain school setting. A personalized virtual fitness trainer has the potential to replace a human trainer whenever possible. It can help physical education teachers in schools to motivate students to exercise. This study discussed the design and development of an AI-based application coined as an Intelligent Virtual Fitness Trainer (IVFIT) as an attempt to provide a personalized physical learning experience for school students. This app is developed to (1) demonstrate five workout activities for 30 minutes; (2) teach the user three types of dances for 22 minutes, and (3) demonstrate five basic self-defense moves. These training scenarios were administered to a physical education class consisting of 23 students in which the recommendation of the fitness trainer is done using a calculation of artificial intelligence algorithms. The percentage of prediction error was calculated after each activity to measure the effectiveness of the app in giving recommendations. Subsequently, a teacher observation test was conducted to determine students' perceptions of the effectiveness of the proposed VFT application. Overall, students found the VFT application to be effective in stimulating higher levels of involvement in physical activity without teacher supervision. It can be concluded from the study that a personalized virtual trainer can assist in assigning a suitable virtual trainer for specific users and can be used for physical education activities.


Introduction
World Health Organization (WHO) has listed 10 threats to global health, which are: (i) Air pollution and climate change, (ii) Non-communicable diseases (NCD), (iii) Threat of a global influenza pandemic, (iv) Fragile and vulnerable settings, such as regions affected by drought and conflict, (v) Antimicrobial resistance, (vi) Ebola and high-threat pathogens, (vii) Weak primary care, (viii) Vaccine hesitancy, (ix) Dengue and (x) HIV [1]. The major risk factors of NCD are usually caused by tobacco use, physical inactivity, harmful use of alcohol, and unhealthy diets [2]. The NCD is the largest killer with an annual death estimation of 38 million worldwide and mainly occurs in the developing countries. [3].
People who have higher excessive weights will have a higher percentage to have a heart attack, diabetes, and other diseases. [4] reported that obesity contributed to two-third of the leading causes for fatal cases of non-communicable disease worldwide. With that, a lot of studies have been done to help humans in controlling obesity problems and find the most suitable solutions to reduce health-related issues caused by obesity. An individual excessive amount of weight can be reduced to the normal level by following The correct amount of physical activities [5]. Regular physical activities also can improve the quality of health and prevents chronic diseases [6]. Fitness is an important goal for a healthy lifestyle and has been used as a measurement of health-related quality of life [7]. School students are usually encouraged to work on their fitness to promote healthy weight loss behaviors. Teaching physical education at the school level may still not be enough to provide the required fitness-related information, especially on the type of exercises that students need to perform. One of the methods to introduce and teach fitness activities to the students is by using a fitness instructor or trainer [8]. A good fitness trainer program also can contribute to the effectiveness of physical education in the educational institution [9]. However, providing a quality personalized fitness experience for students is a challenging task. This is because a lot of information (e.g. activity level, body mass index [BMI], basal metabolic rates [BMR], medical conditions, and calorie intakes) needs to be analyzed to personalize the composition of the physical stimulus.
The process of providing a personalized trainer for every student requires time and money. Thus, the technology of artificial intelligence (AI) can be used to accelerate the process of personalization by calculating the most suitable fitness regime for the specific student's needs or preferences. This study objectively discussed the application of AI technology in providing a suitable recommendation of a virtual fitness trainer based on the user-submitted attributes.

Personalized Trainer
Nowadays, many health and fitness applications are being built to provide a more comprehensive virtual coaching or virtual trainer experience. However, some commercialized exercise games (combining exercise with gameplay) are not optimized for specific user groups and do not adequately consider the preferences or needs of every user [10]. Despite the availability of a great number of health and fitness applications on the market, the diversity of these applications is still limited. This is why VFT can be used to make physical training part of the school curriculum.
There are pieces of evidence in supporting the effectiveness of virtual trainers that have improved human fitness [11]. Virtual trainers that look like carton avatar, in general, have been openly accepted by the users. Several studies such as [12] and [13] have used intelligent virtual agents for fitness activities. Liang [14], for example, has used a VTF to teach Tai-chi app for the elderly, and Karkar [15] has developed a game-based aerobic VR trainer that gave points for the calories burned from the activities. VFT also can be used for other activities such as teaching CPR [16] and pregnancy exercise simulation [17].
Despite these efforts, there is still a lack of research on the personalization of physical movements that the virtual trainer displays following the user's demands. There is also a lack of evidence about the effectiveness of VFT in facilitating primary school students' learning of physical activities and skills. Nevertheless, most of the available personalized virtual trainers are used to input information from the user in terms of sensor data logging input [18], game-based design [19], as well as a step counter and muscle activities [7]. Typically, the use of wearable devices to personalize physical activities according to preferences is costly. This led fitness experts to suggest the use of several crucial pieces of information, such as the user's body mass and activity level for a fitness program to be effective [20]. Unfortunately, this information was not routinely collected when assigning the exercise to the user.
This study argues that a virtual fitness application can be improved by implementing personalized training programs where the physical activities are tailored to the specific user's needs. In particular, a detailed design of virtual trainers can facilitate the development process of a personalized fitness exercise program. In this case, we used an AI algorithm to calculate and personalize the VFT. A case-based reasoning (CBR) algorithm was used in developing the proposed VFT application mainly because it requires less computing time. The working process of this algorithm is based on how humans think, process information, and link previous experiences to provide effective solutions [21]. The idea of CBR comes from the way cognitive psychology research posits that humans rely on prior knowledge or experience to solve problems [22]. The main strength of the CBR algorithm is the ability to use the positive and negative results from the case database to improve the quality of the recommended solution. In this study, the CBR algorithm was applied to identify the most suitable VFT based on a set of reference cases stored in the database. The following section describes the design and development of the personalized VFT application.

The APP
A mobile application was developed and uploaded to the app store to achieve the objectives of this study. This app is an AI-based application coined as an Intelligent Virtual Fitness Trainer (IVFIT). The application consists of three parts: (1) obtaining and processing students' health information, (2) display of the personalized VFT, and (3)   260 The Effectiveness of a Personalized Virtual Fitness Trainer in Teaching Physical Education by Applying the Artificial Intelligent Algorithm providing a list of trainers that the user can choose from. The users can select their virtual trainer through a personalized function that was designed to recommend the most suitable trainer based on the information provided by them. The feedback received from the user after performing the physical is recorded by the application to continuously improve the personalization of VFTs. Table 1 presents a list of movements performed by each trainer in the proposed VFT application. There were five main trainers used to stimulate students' learning of different movements. The types of training programs were specifically developed to take into consideration the different preferences of the user groups based on their BMI value. When the BMI value was increased, the performance demands of the task were increased. Fig. 1 shows one of the input pages for the information collection process from the users and Fig. 2 shows the VFT's provided by the app.

The CBR Calculation
The process of problem-solving in CBR consists of retrieving similar cases based on the following: (1) retrieval of previous experiences with similar problem descriptions, (2) the reuse of solutions from the retrieved cases, (3) revision of the solutions, and (4) retaining the new solutions [23]. In general, the most crucial part of the CBR cycle is the retrieval process in which the correct cases are retrieved from a given database [24]. The effectiveness of the CBR was determined based on the usefulness of the retrieved cases [25]. Bejarano [26] stated that a successful retrieval process is achieved when the system retrieves cases that are similar to the problem descriptions. The characteristics of the retrieved cases must be relevant to the user's request. This process is guided by calculating the association of similar values between the new and previous cases [27]. The retrieval process works by determining how close the current case is to the predefined ones [28]. In this study, a set of references was obtained from ten sets of data that were used for calculation purposes.
The retrieval of the selected cases was achieved by calculating the local and global similarity values of cases [29]. Whenever a new case was submitted by the user, the application retrieved cases that closely matched the user's request. The process of recommending VFT was established during the 'reuse' process. The reuse process offers a way to retrieve solutions to the case ID identified during the 'retrieval' process [30]. The solution generated from this process is presented to the user through the user interface model [31]. The 'revision' process was established in this study when the suggested solution from the 'reuse' process was relevant to the user needs. If the provided solutions did not fit or meet the user needs, then the system used the feedback to refine and update the case's status and features in the database. The updated information was retained in the database for the next recommendation to be more accurate.

The Reference Database
The reference database was set up in this study based on the following attributes: (1) case ID, (2) weight, (3) height, (4) activity level, (5) gender, and (6) age. The personalization process of VFT from calculating the BMI value was suggested by fitness experts. The reference database consisted of 10 sets of data. The reference database was used to feed the CBR algorithm with information necessary for selecting the VFT based on the similarity calculation value discussed above. A case with the highest global similarity value was considered a reference case. Fig. 3 shows the architecture of the application.

Methodology
This study was executed in two phases: (1) the design and development phase (discussed above), and (2) the evaluation phase. We used a survey to estimate the percentage of the prediction error. A total of 23 participants were asked to use the proposed application by which the accuracy of the personalization process was calculated based on the new data submitted.

Demography of the Respondents
All the respondents were from the same class aged from 19 to 23 years old and have never used a fitness app before the experiment has been carried out. These students were asked to supply the application with information about their age, weight, height, gender, and activity level. This information was labeled as 'new' and then used for further analysis. Then, an interview was conducted with six students from the same age group to better understand their perceptions about using the proposed VFT in physical education. All the participants in this study were recruited using a random sampling technique.

Data Collection and Analysis
The data are collected by asking the user to use the app on their mobile phones. The experiment runs for a week and the data were collected and stored in the app. After the users submitted their data by filling their information in the pages on the app, the app directly calculated and displayed their suggested trainer by using the CBR calculation. The result of the suggestion was then collected and analyzed to know the prediction error using regression analysis.

Result
A descriptive analysis was used to analyze the percentage of the prediction error of the 23 participants (12 female and 11 male). The majority of the participants (70%) responded that they considered themselves very active in their daily life. The remaining participants (30%) responded that they performed little or no exercise daily. The mean BMI score was 24.5 (with a maximum value of 40 and a minimum value of 13.2) which can be considered normal for this study. The different attributes describing each participant were collected for the testing purposes of the personalization process. These variations were considered important to estimate the percentage of the prediction error, to give an insight into the effectiveness of the proposed application.

The Regression Analysis of Prediction Error and Global Similarity
Actual data were used to measure the effectiveness and accuracy of the prediction of the proposed application. The percentage of prediction error was based on the users' inputs. It is also tested whether the prediction error value could be reduced with the increase of the global similarity value. Participants' information such as gender, age, activity level, height, and weight were collected individually and then processed by the CBR algorithm. Then, the predicted and actual results were compared to get the prediction value. The following equation was used to estimate the prediction error in this study: (1) By assuming that no assumptions have been violated, two outliers were eliminated from the collected new cases. The R2 result of 21.4% indicates that the total variation in the dependent variable (percentage of error prediction) can be explained by the independent variable (global similarity score). With a p-value < 0.035, it can be said that there was a statistically significant effect of the global similarity score on the percentage of prediction error, which was also considered a good fit for the data as in the equation below.
Percentage of prediction error = 281.48 -2.75 (global similarity) This also indicates that the higher the global similarity value, the lower the percentage of prediction error in the proposed application. Since only the solution of the most similar cases was presented to the user, the percentage of prediction error can be further maximized.

Observation Result
A total of six exploratory unstructured interviews were conducted with a convenience group of primary school students (ages between 7 and 12 years; three male and three female). An interview involves keeping the meaning of the phenomenon open and continuing to ask questions [32]. Based on this, we attempted to strike a balance between allowing the story to emerge and directing the interview. The interviews with students started with the question, 'how do you like using the VFT application in performing physical activities?' The majority of students expressed their excitement about using the VFTs to perform different physical exercises. For example, four students stated that their use of personalized VFT enabled them to try out all the physical movements with their friends. This type of scaffolding (virtual trainers) is believed to provide strong and timely support for the students as they have the choice of using several trainers to perform the same activity. All of the participants showed a preference for virtual fitness motion as compared to the actual classroom. This indicated that the students were highly motivated to perform the movement cooperatively and without teacher supervision. One participant stated that the visual appeal of the trainers was the main factor in driving his decision to use the VFT applications. Overall, the students found that using the proposed VFT application stimulated their involvement in physical activity without needing to have a teacher present. Since this study focused on the utilization of personalized learning algorithms which has been mentioned earlier, the focus is on how the app can suggest virtual trainers by using predefined information. This technology can help teachers in conditions where an assisted system is needed to help teachers in making judgments and can act as a potential helper in the future.

Discussion
Emerging Trends in the area of health education show that there is an increase in the development of applications that are more personalized and accurate. Studies have shown that by having a personal fitness trainer, people can easily follow fitness and weight loss programs [10]. Nevertheless, the design and development process of the virtual trainers must adhere to the specific guidelines of fitness experts to make the physical activities more effective and stimulating.
This study described the design and development of a VFT application to help users perform fitness activities and specific movement. The CBR algorithm was used to provide an accurate calculation of the virtual trainers' characteristics to the end-users. All the important attributes (e.g., weight, height, age, gender, and activity level) needed to personalize the virtual trainer for each user were identified and used along with two important values for fitness activity (BMI and BMR values). The five VFTs developed in this study were evaluated individually by the user to perform a series of fitness-related activities.
This app has several distinguished differences and the results from this study can be used by developers and educators in physical fitness education to design and develop a good and effective virtual fitness trainer app. Personalization can solve the problems of assigning suitable fitness trainers to the users based on the users' predefined attributes. This is aligned with the study done by [33] that personalized health-related app can help to encourage physical activity.

Conclusion
The results of the percentage of prediction error showed that the higher the global similarity value, the lower the percentage of prediction error in the proposed VFT application. The observation results of users while using the application revealed that they felt more engaged in performing physical activities when they used VFTs, without a need for teacher presence.
Although the trainers have been designed carefully, there are still more improvements to be made with the proposed application. It is believed that the percentage of prediction error can be further reduced by using more data and by performing more iterations so that the recommendation results are more appropriate. Besides, when the application personalizes virtual trainers, users will be more engaged and involved with the physical activity. This is because using personalized trainers can help meet users' needs. The use of an intelligent tutor such as a personalized trainer that can enhance productivity and support learning is a growing need in the field of education [34]. This study offers new insights into the design of virtual trainers in physical education, which is yet to be tested in actual settings.

Limitations and Further Study
This study is limited to testing the functionality of the app for a specific group of users only. To deploy the app for a bigger group of users, more testing and added functions should be included for the app to be fully utilized to maximize the functionality. Future studies are advised to test the physical activities with a larger sample size. Furthermore, future studies may also consider adding more specifications to the design of virtual trainers in a way that reflects a vision of a future scenario for physical education learners. More trainers can be added to the app to make it more interesting and cater to a different group of people.