# NOT RUN {
# Train standard regression forests
n = 50; p = 10
X = matrix(rnorm(n*p), n, p)
Y = X[,1] * rnorm(n)
r.forest1 = regression_forest(X, Y, compute.oob.predictions = FALSE, num.trees = 100)
r.forest2 = regression_forest(X, Y, compute.oob.predictions = FALSE, num.trees = 100)
# Join the forests together. The resulting forest will contain 200 trees.
big_rf = merge_forests(list(r.forest1, r.forest2))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab