Displaying 1 result from an estimated 1 matches for "var_x_names".
Did you mean:
var_names
2012 Nov 01
0
oblique.tree : the predict function asserts the dependent variable to be included in "newdata"
...---------------------------------------------------------------------------------------------
library(oblique.tree)
N <- 100; nvars <- 3;
x <- array(rnorm(n = N*nvars), c(N,nvars))
y <- as.factor(sample(0:1, size = N, replace = T))
m <- data.frame(x,y);
var_names <- colnames(m);
var_x_names <- var_names[-length(var_names)]
n_train <- floor(N/2); n_test <- N - n_train;
train <- m[1:n_train,]; test <- m[-(1:n_train),];
bot <- oblique.tree(formula = y ~., data = train,
oblique.splits = "on", variable.selection = "none",
split.impurity = "gini...