Displaying 2 results from an estimated 2 matches for "n_train".
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");
### If the dependent variable is...
2013 Mar 24
3
Parallelizing GBM
...ed reasons, and I usually call it this
way
gbm_model <- gbm.fit(trainRF,prices_train,
offset = NULL,
misc = NULL,
distribution = "multinomial",
w = NULL,
var.monotone = NULL,
n.trees = 50,
interaction.depth = 5,
n.minobsinnode = 10,
shrinkage = 0.001,
bag.fraction = 0.5,
nTrain = (n_train/2),
keep.data = FALSE,
verbose = TRUE,
var.names = NULL,
response.name = NULL)
Does anybody know an easy way to parallelize the model (in this case it
means simply having 4 cores on the same machine working on the problem)?
Any suggestion is welcome.
Cheers
Lorenzo