Skip to main content
. 2020 Aug 17;20(16):4607. doi: 10.3390/s20164607
Algorithm 2. Construction of Random Forest
Input: Originally collected CSI data packetD, each data packet containsjdata forN test cases
Input: the size of the forest: s
Output: random forest: F
1. generate training dataset Dtrain by Wavelet transform
2. for i = 1 to s do
3. Generate new training dataset Dtraini(i=1,2,s) by bootstrap aggregating
4. set m=log2M
5. randomly select m attributes from Dtraini
6. use Dtraini train the ith DT based Algorithm1
7. end
8. combine the s Decision Trees on the basic thought of voting method.
9. return F