Skip to main content
. 2023 Jan 22;25(2):215. doi: 10.3390/e25020215
Algorithm 2: Bagging algorithm in the proposed model

Input: Datasets

(X,Y)={(x1,y1),(x2,y2),(x3,y3),...,(xm,ym)},

xjX,xj is an image, yjY,yj is the label of xj:

Base learner algorithm:

Iterations n.

Process:

for i=1,2,3,,n

Sampling randomly from training set X using bootstrapping and Xi can be

obtained, Xi is a subset of the training set X:

Training base learner Bi with RL ondataset Xi;

end for

Output: The results of each base learner Bi are combined into a final result by a

plurality voting strategy,

F(x)=argmaxyYi=1n(fi(x)¬y)