change higgs script, remove R wrapper

This commit is contained in:
tqchen
2014-08-27 21:13:04 -07:00
parent 7ab45b3e64
commit 12b19c97fa
11 changed files with 10 additions and 8951 deletions

View File

@@ -1,5 +1,6 @@
# include xgboost library, must set chdir=TRURE
source("../../wrapper/xgboost.R", chdir=TRUE)
# install xgboost package, see R-package in root folder
require(xgboost)
require(methods)
modelfile <- "higgs.model"
outfile <- "higgs.pred.csv"

View File

@@ -1,5 +1,7 @@
# include xgboost library, must set chdir=TRURE
source("../../wrapper/xgboost.R", chdir=TRUE)
# install xgboost package, see R-package in root folder
require(xgboost)
require(methods)
testsize <- 550000
dtrain <- read.csv("data/training.csv", header=TRUE)
@@ -12,7 +14,7 @@ sumwpos <- sum(weight * (label==1.0))
sumwneg <- sum(weight * (label==0.0))
print(paste("weight statistics: wpos=", sumwpos, "wneg=", sumwneg, "ratio=", sumwneg / sumwpos))
xgmat <- xgb.DMatrix(data, info = list(label=label, weight=weight), missing = -999.0)
xgmat <- xgb.DMatrix(data, label = label, weight = weight, missing = -999.0)
param <- list("objective" = "binary:logitraw",
"scale_pos_weight" = sumwneg / sumwpos,
"bst:eta" = 0.1,