Название: Machine Learning for Healthcare Applications
Автор: Группа авторов
Издательство: John Wiley & Sons Limited
Жанр: Программы
isbn: 9781119792598
isbn:
There are two phases in the proposed system. Thus, the Phase-I needs one dataset and the Phase-II needs a different dataset with class labels. The example dataset is described in Table 2.1.
2.4.4.5 Example
Let the individual’s activities and measures for a day are:
Input = (Age = 21) ∩ (Gender = Male) ∩ (No. of cigars smoked = 0) ∩ (Units of Alcohol Consumed = 2) ∩ (Screen Time = 6) ∩ (Sleep Time = 8) ∩ (Height = 176) ∩ (Weight = 63) ∩ (Calorie Intake = 1,800) ∩ (Physical Activity = Lightly Active).
Table 2.1 Sample Dataset for Phase-I.
Class | Condition | Class label | Description |
---|---|---|---|
Sleep | |||
0 | for age less than 2 sleep value between 11 and 14For age between 3 and 5 sleep value between 10 and 13For age between 6 and 13 sleep value between 9 and 11For age between 14 and 17 sleep value between 8 and 10For age between 18 and 25 sleep value between 7 and 9For age between 26 and 64 sleep value between 7 and 9For age greater than 65 sleep value between 7 and 8 | normal | It tells the optimal sleep value for different age groups |
1 | for age less than 2 sleep value between 9 and 10For age between 3 and 5 sleep value between 8 and 9For age between 6 and 13 sleep value between 7 and 8For age between 14 and 17 sleep value between 7 and 8For age between 18 and 25 sleep value between 6 and 7For age between 26 and 64 sleep value between 6 and 7For age greater than 65 sleep value between 5 and 6 | less sleep | It tells the sleep value is less than the optimal value for different age groups |
2 | for age less than 2 sleep value between 15 and 16For age between 3 and 5 sleep value between 13 and 14For age between 6 and 13 sleep value between 11 and 12For age between 14 and 17 sleep value between 10 and 11For age between 18 and 25 sleep value between 9 and 10For age between 26 and 64 sleep value between 9 and 10For age greater than 65 sleep value between 8 and 9 | more sleep | It tells the sleep value is more than the optimal value for different age groups |
Smoke | |||
0 | if the number of cigars smoked is 0 | good smoke status | |
1 | if the number of cigars smoked is between 1 and 4 | smoking status is reasonable | |
2 | if the number of cigars smoked is between 5 and 15 | bad smoking status | |
3 | if the number of cigars smoked is more than 15 | dangerous smoking status | |
Drink | |||
0 | if the number of units consumed is 0 | drinking status is good | |
1 | if gender is male and the number of units consumed is less than 2 If gender is female and the number of units consumed is less than 1 | drinking status is reasonable | |
2 | if gender is male and the number of units consumed is between 3 and 4 If gender is female and the number of units consumed is less than 2 and 3 | drinking status is bad |
2.4.5 Pre-Processing
BMR = (10 × Weight in kg) + (6.25 × Height in cm) − (5 × Age in years) + 5 ---------[4]
BMR = 10 × 63 + 6.25 × 176 − 5 × 21 + 5 = 1630
Calories needs to be consumed = BMR × Physical Activity = 1630 × 1.375 = 2241.25
Calorie Difference = Calories consumed − Calories needs to be consumed = 1,800 − 2241.25 = −441.25.
Thus, inputs after pre-processing are:
Input1 = (Age = 21) ∩ (Gender = Male) ∩ (No. of cigars smoked = 0) ∩ (Units of Alcohol Consumed = 2) ∩ (Screen Time = 6) ∩ (Sleep Time = 8) ∩ (Calorie Difference = −441.25).
2.5 Experimental Results
We have developed two models in this chapter based on the two popular machine learning algorithms which are Decision tree and Random forest and tested both the models based on the synthetic dataset. We have developed a web-based application to demonstrate the models proposed in this chapter. A few screenshots of the application shown in Figure 2.2.
2.5.1 Performance Metrics
To analyze the effectiveness and the performance of the model proposed in this chapter, we used the standard performance metrics [13] and [3] accuracy, precision, recall, and F1-score.
2.5.1.1 Accuracy
The accuracy of the model is calculated using the equation given below.
Table 2.2 shows the accuracy of the model for the decision tree proposed in this chapter.
Figure 2.3 shows the accuracy comparison between the two models which are proposed in this chapter and it is observed the model-II gives more accuracy than the model-I.
Figure 2.2 Screenshots СКАЧАТЬ