title: why h2o.randomForest in R make much better predictions than randomForest packages
body: <pre><code>setwd("D:/Santander")
  
  ## import train dataset
  train&lt;-read.csv("train.csv",header=T)
  
  
  dim(train)
  
  summary(train)
  
  str(train)
  
  prop.table(table(train2$TARGET))
  
  stats&lt;-function(x){
    length&lt;-length(x)
    nmiss&lt;-sum(is.na(x))
    y&lt;-x[!is.na(x)]
    freq&lt;-as.data.frame(table(y))
    max_freq&lt;-max(freq[,2])/length
    min&lt;-min(y)
    median&lt;-median(y)
    max&lt;-max(y)
    mean&lt;-mean(y)
    freq&lt;-length(unique(y))
    return(c(nmiss=nmiss,min=min,median=median,mean=mean,max=max,freq=freq,max_freq=max_freq))
  }
  
  
  var_stats&lt;-sapply(train,stats)
  
  var_stats_1&lt;-t(var_stats)
  
  ###将最大频数类别比例超过0.9999，其它类别小于1/10000的变量全删除
  
  exclude_var&lt;-rownames(var_stats_1)[var_stats_1[,7]&gt;0.9999]
  
  train2&lt;-train[,! colnames(train) %in% c(exclude_var,"ID")]
  
  
  
  
  rm(list=setdiff(ls(),"train2"))
  
  train2&lt;-train2[1:10000,]
  
  write.csv(train2,"example data.csv",row.names = F)
  
  ##随机将数据分为训练集与测试集
  set.seed(1)
  ind&lt;-sample(c(1,2),size=nrow(train2),replace=T,prob=c(0.8,0.2))
  
  train2$TARGET&lt;-factor(train2$TARGET)
  train_set&lt;-train2[ind==1,]
  test_set&lt;-train2[ind==2,]
  
  rm(train2)
  ##1\用R randomForest构建预测模型 100棵树
  library(randomForest)
  
  memory.limit(4000)
  
  random&lt;-randomForest(TARGET~.,data=train_set,ntree=50)
  
  print(random)
  
  random.importance&lt;-importance(random)
  
  p_train&lt;-predict(random,train_set,type="prob")
  
  pred.auc&lt;-prediction(p_train[,2],train_set$TARGET)
  
  performance(pred.auc,"auc")
  
  ##train_set auc=0.8177
  
  
  ## predict test_set
  p_test&lt;-predict(random,newdata = test_set,type="prob")
  
  pred.auc&lt;-prediction(p_test[,2],test_set$TARGET)
  performance(pred.auc,"auc")
  
  ##test_set auc=0.60
  
  
  #________________________________________________#
  
  ##_________h2o.randomForest_______________
  
  library(h2o)
  h2o.init()
  
  train.h2o&lt;-as.h2o(train_set)
  test.h2o&lt;-as.h2o(test_set)
  
  random.h2o&lt;-h2o.randomForest(,"TARGET",training_frame = train.h2o,ntrees=50)
  
  
  importance.h2o&lt;-h2o.varimp(random.h2o)
  
  p_train.h2o&lt;-as.data.frame(h2o.predict(random.h2o,train.h2o))
  
  pred.auc&lt;-prediction(p_train.h2o$p1,train_set$TARGET)
  
  performance(pred.auc,"auc")
  
  ##auc=0.9388, bigger than previous one
  
  ###test_set prediction
  
  p_test.h2o&lt;-as.data.frame(h2o.predict(random.h2o,test.h2o))
  
  pred.auc&lt;-prediction(p_test.h2o$p1,test_set$TARGET)
  
  performance(pred.auc,"auc")
  
  ###auc=0.775
  </code></pre>
  
  <p>I tried to make predictions with Kaggle competitions: Santander customer satisfaction: <a href="https://www.kaggle.com/c/santander-customer-satisfaction" rel="nofollow noreferrer">https://www.kaggle.com/c/santander-customer-satisfaction</a>
  When i use randomForest package in R, i got final result in test data of AUC=0.57, but when i use h2o.randomForest, i got final result in test data of AUC=0.81.the parameters in both function are same, i only used the default parameters with ntree=100.
  So why h2o.randomForest make much better predictions than randomForest package itself? </p>