# NOT RUN {
p = 10
n = 100
X = matrix(2 * runif(n * p) - 1, n, p)
Y = (X[,1] > 0) + 2 * rnorm(n)
rrf = regression_forest(X, Y, mtry=p)
sample.weights.oob = get_sample_weights(rrf)
n.test = 15
X.test = matrix(2 * runif(n.test * p) - 1, n.test, p)
sample.weights = get_sample_weights(rrf, X.test)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab