Instrumentation & Measurement Magazine 25-9 - 47
Fig. 5. Effect of minimum number of samples in leaf nodes on performance.
Decision Trees and Random Forests
To compare the performances of different ML algorithms for
pepper powder adulteration identification, other ML methods
including decision tree and a random forest algorithm were investigated
in this research.
Decision Tree Algorithm
In this section, a decision tree classification algorithm was used
to recognize the adulterations of pepper power. 500 sample
sets of pepper powders No. 9 and No. 10 were randomly selected.
The training and test sets were divided with the same
way as used above for SVM algorithm. The model was trained
using Barging Decision Trees (DT), and the optimal number
of leaf node samples was determined by cross-validation, as
shown in Fig. 5. The error of the decision tree model was less
than 0.30 when the minimum number of samples was less than
Fig. 6. Confusion matrix of classification results of decision tree for No. 9
pepper, where labels 1 to 5 indicate the pure pepper mixture with bran powder,
rosin powder, corn flour and rice bran powder, respectively.
70, but the model error abruptly increased when the minimum
sample size of the leaf was greater than 70. Hence, the optimal
value for minimum sample size of leaf node was 1 in this case.
The prediction results of the testing set with the decision
tree algorithm based on the experimental data of pepper powder
No. 9 and No. 10 are listed in Table 6 and Table 7. The
confusion matrix of the prediction results for pepper powder
No. 9 are shown in Fig. 6. It is noted that the decision tree algorithm
had higher prediction accuracy for pure pepper and
the samples adulterated with rosin powder than other the
kinds of adulteration samples, reaching 98.61% and 98.41%.
However, the recognition accuracy for the samples with bran
powder and corn flour were lower than 90%. For failed prediction
samples, the adulteration of corn flour was often
Table 6 - Training and prediction results of No. 9 pepper powder (3-6, 3-7 combined)
Number of
experiments
1
2
3
Average
Pure pepper
powder
100%
100%
95.83%
98.61%
Bran mixed
powder
73.68%
100%
66.67%
80.12%
Rosin powder
mixed
95.23%
100%
100%
98.41%
Corn flour
mixed
88%
77.27%
63.16%
76.14%
Mixed with
rice bran
powder
76.47%
85.71%
88.89%
83.69
Table 7 - Training and prediction results of No. 10 pepper powder
Number
1
2
3
Average
December 2022
Pure pepper
powder
94.74%
92.86%
87.5%
91.7%
Bran mixed
powder
88.89%
91.30%
72%
84.06%
Rosin powder
mixed
94.74%
90%
100%
94.91%
Corn flour
mixed
85%
86.36%
75%
82.12%
IEEE Instrumentation & Measurement Magazine
Mixed with
rice bran
powder
66.67%
80.95%
62.5%
70.04%
Mean
86.01%
88.29%
79.4%
84.57%
47
Average
86.68%
92.60%
82.91%
87.40%
Instrumentation & Measurement Magazine 25-9
Table of Contents for the Digital Edition of Instrumentation & Measurement Magazine 25-9
Instrumentation & Measurement Magazine 25-9 - Cover1
Instrumentation & Measurement Magazine 25-9 - Cover2
Instrumentation & Measurement Magazine 25-9 - 1
Instrumentation & Measurement Magazine 25-9 - 2
Instrumentation & Measurement Magazine 25-9 - 3
Instrumentation & Measurement Magazine 25-9 - 4
Instrumentation & Measurement Magazine 25-9 - 5
Instrumentation & Measurement Magazine 25-9 - 6
Instrumentation & Measurement Magazine 25-9 - 7
Instrumentation & Measurement Magazine 25-9 - 8
Instrumentation & Measurement Magazine 25-9 - 9
Instrumentation & Measurement Magazine 25-9 - 10
Instrumentation & Measurement Magazine 25-9 - 11
Instrumentation & Measurement Magazine 25-9 - 12
Instrumentation & Measurement Magazine 25-9 - 13
Instrumentation & Measurement Magazine 25-9 - 14
Instrumentation & Measurement Magazine 25-9 - 15
Instrumentation & Measurement Magazine 25-9 - 16
Instrumentation & Measurement Magazine 25-9 - 17
Instrumentation & Measurement Magazine 25-9 - 18
Instrumentation & Measurement Magazine 25-9 - 19
Instrumentation & Measurement Magazine 25-9 - 20
Instrumentation & Measurement Magazine 25-9 - 21
Instrumentation & Measurement Magazine 25-9 - 22
Instrumentation & Measurement Magazine 25-9 - 23
Instrumentation & Measurement Magazine 25-9 - 24
Instrumentation & Measurement Magazine 25-9 - 25
Instrumentation & Measurement Magazine 25-9 - 26
Instrumentation & Measurement Magazine 25-9 - 27
Instrumentation & Measurement Magazine 25-9 - 28
Instrumentation & Measurement Magazine 25-9 - 29
Instrumentation & Measurement Magazine 25-9 - 30
Instrumentation & Measurement Magazine 25-9 - 31
Instrumentation & Measurement Magazine 25-9 - 32
Instrumentation & Measurement Magazine 25-9 - 33
Instrumentation & Measurement Magazine 25-9 - 34
Instrumentation & Measurement Magazine 25-9 - 35
Instrumentation & Measurement Magazine 25-9 - 36
Instrumentation & Measurement Magazine 25-9 - 37
Instrumentation & Measurement Magazine 25-9 - 38
Instrumentation & Measurement Magazine 25-9 - 39
Instrumentation & Measurement Magazine 25-9 - 40
Instrumentation & Measurement Magazine 25-9 - 41
Instrumentation & Measurement Magazine 25-9 - 42
Instrumentation & Measurement Magazine 25-9 - 43
Instrumentation & Measurement Magazine 25-9 - 44
Instrumentation & Measurement Magazine 25-9 - 45
Instrumentation & Measurement Magazine 25-9 - 46
Instrumentation & Measurement Magazine 25-9 - 47
Instrumentation & Measurement Magazine 25-9 - 48
Instrumentation & Measurement Magazine 25-9 - 49
Instrumentation & Measurement Magazine 25-9 - 50
Instrumentation & Measurement Magazine 25-9 - 51
Instrumentation & Measurement Magazine 25-9 - 52
Instrumentation & Measurement Magazine 25-9 - 53
Instrumentation & Measurement Magazine 25-9 - 54
Instrumentation & Measurement Magazine 25-9 - 55
Instrumentation & Measurement Magazine 25-9 - 56
Instrumentation & Measurement Magazine 25-9 - 57
Instrumentation & Measurement Magazine 25-9 - 58
Instrumentation & Measurement Magazine 25-9 - 59
Instrumentation & Measurement Magazine 25-9 - 60
Instrumentation & Measurement Magazine 25-9 - 61
Instrumentation & Measurement Magazine 25-9 - 62
Instrumentation & Measurement Magazine 25-9 - 63
Instrumentation & Measurement Magazine 25-9 - 64
Instrumentation & Measurement Magazine 25-9 - 65
Instrumentation & Measurement Magazine 25-9 - 66
Instrumentation & Measurement Magazine 25-9 - 67
Instrumentation & Measurement Magazine 25-9 - 68
Instrumentation & Measurement Magazine 25-9 - 69
Instrumentation & Measurement Magazine 25-9 - Cover3
Instrumentation & Measurement Magazine 25-9 - Cover4
https://www.nxtbook.com/allen/iamm/26-4
https://www.nxtbook.com/allen/iamm/26-3
https://www.nxtbook.com/allen/iamm/26-2
https://www.nxtbook.com/allen/iamm/26-1
https://www.nxtbook.com/allen/iamm/25-9
https://www.nxtbook.com/allen/iamm/25-8
https://www.nxtbook.com/allen/iamm/25-7
https://www.nxtbook.com/allen/iamm/25-6
https://www.nxtbook.com/allen/iamm/25-5
https://www.nxtbook.com/allen/iamm/25-4
https://www.nxtbook.com/allen/iamm/25-3
https://www.nxtbook.com/allen/iamm/instrumentation-measurement-magazine-25-2
https://www.nxtbook.com/allen/iamm/25-1
https://www.nxtbook.com/allen/iamm/24-9
https://www.nxtbook.com/allen/iamm/24-7
https://www.nxtbook.com/allen/iamm/24-8
https://www.nxtbook.com/allen/iamm/24-6
https://www.nxtbook.com/allen/iamm/24-5
https://www.nxtbook.com/allen/iamm/24-4
https://www.nxtbook.com/allen/iamm/24-3
https://www.nxtbook.com/allen/iamm/24-2
https://www.nxtbook.com/allen/iamm/24-1
https://www.nxtbook.com/allen/iamm/23-9
https://www.nxtbook.com/allen/iamm/23-8
https://www.nxtbook.com/allen/iamm/23-6
https://www.nxtbook.com/allen/iamm/23-5
https://www.nxtbook.com/allen/iamm/23-2
https://www.nxtbook.com/allen/iamm/23-3
https://www.nxtbook.com/allen/iamm/23-4
https://www.nxtbookmedia.com