Skip to main content
. 2020 May 13;22(5):545. doi: 10.3390/e22050545
Algorithm 1. Weighted quantile Regression Forest algorithm pseudocode.
input: Number of Trees (m), random subset of the features (mtry), training dataset (D), probability α for quantile estimation
output: weighted quantile Regression Forests (wqRF)
1:   wqRF is empty
2:   for each k = 1 to m do
3:     Dk = Bootstrap Sample (D)
4:     DTk = Random Decision Tree (Dk, mtry)
5:     wqRF = wqRFDTk 
6:   end
7:   for each i = 1 to n do
8:     Compute wiobs using Formula (13)
9:   end
10:   for each k = 1 to m do
11:     Compute wRMSEk using Formula (12)
12:   end
13:   for each k = 1 to m do
14:     Compute wk using Formula (14)
15:   end
16:   Compute final prediction Q^αweighted(Y|X=x) using Formula (11)
17:   return wqRF