Xy(task = "regression")
recipe <- Xy(task = "regression" ) %>%
add_linear(p = 2, family = xy_normal())
simulate(recipe)
I have not figured it out yet. I just used an older version of R with an older Xy
2) There seems to be a problem or a change with raply. Here is a small snippet showing what happens.
f<-function(){
list(runif(10), data.frame(matrix(0,2,2)))
}
temp <- plyr::raply(2, f() )
> temp
1 2
[1,] Numeric,10 List,2
[2,] Numeric,10 List,2
trees<-lapply (c(1:n_trees), f<-function(x){sprout_tree(formula = formula, feature_frac = feature_frac, data = data )})
source("../algorithms/reg_rf.R")
mod3 <- reg_rf(formula = eq, data = model_df,n_trees=10,feature_frac=0.63)
plot(mod3$fit , model_df$y)
cor(mod3$fit, model_df$y) #0.01
I think this is because the fits coming out of sprout_tree are for the boostrapped data set and not the original data set.
I can see a fix for this but I thought I woudl check with you first in case I was missing something.