Skip to main content
. 2023 Dec 1;13(23):3721. doi: 10.3390/ani13233721
Algorithm 1 GBDT training with fusion features for broiler weight estimation
INPUT:  S = { Xmn, Ym }: Training set, Xmn is fusion features with 2073 dimension, Ym
          is body weight
    K: The number of regression decision trees
    ρ: The learning rate
OUTPUT:  FK(x): Trained gradient boosting regression tree
1. Set squared loss function: L(Ym,f(Xmn))=12(Ym,f(Xmn))2
2. Initializ f0(X)=Y¯, where Y¯ is the average weight, and m represents the number of samples.
3. for each tree k in K do:
4.  Calculate the negative gradient according to the loss function.
     Y→m=−[∂L(Ym,f(Xmn))∂f(Xmn)]f(X)=fk−1(X)=Ym−fk−1(Xmn)
5.  Establish a binary regression decision tree with J leaf region Rjk.
6.  Calculate the predicted weight Cjk of each Rjk.
      Cjk=argminc∑Xmn∈RjkL(Ym,fk−1(Xmn)+c)=avgXmn∈RjkY→m
7.  Obtain the prediction of the kth regression decision tree and update result.
       fk(X)=fk−1(X)+ρ∑j=1JCjkI(X∈Rjk)
8. end for