Skip to content

Commit

Permalink
Test changes, adding destination_key
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Vidrio committed Jan 27, 2015
1 parent f9e0a32 commit 22067ae
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions h2o-r/h2o-package/R/constants.R
Expand Up @@ -156,6 +156,7 @@ assign("LOG_FILE_NAME", NULL, .pkg.env)
data.frame(type = "H2OFrame", scalar = TRUE, row.names = "Key", stringsAsFactors = FALSE),
data.frame(type = "H2OFrame", scalar = TRUE, row.names = "Key<Frame>", stringsAsFactors = FALSE),
data.frame(type = "character", scalar = TRUE, row.names = "Key<Key>", stringsAsFactors = FALSE),
data.frame(type = "character", scalar = TRUE, row.names = "Key<Model>", stringsAsFactors = FALSE),
data.frame(type = "numeric", scalar = TRUE, row.names = "int", stringsAsFactors = FALSE),
data.frame(type = "numeric", scalar = FALSE, row.names = "int[]", stringsAsFactors = FALSE),
data.frame(type = "numeric", scalar = TRUE, row.names = "long", stringsAsFactors = FALSE),
Expand Down
2 changes: 1 addition & 1 deletion h2o-r/h2o-package/R/deeplearning.R
Expand Up @@ -68,7 +68,7 @@
#' dep <- names(iris.hex)[5]
#' iris.dl <- h2o.deeplearning(x = indep, y = dep, data = iris.hex, activation = "Tanh", epochs = 5)

h2o.deeplearning <- function(x, y, training_frame, key = "",
h2o.deeplearning <- function(x, y, training_frame, destination_key = "",
override_with_best_model,
do_classification = TRUE,
n_folds = 0,
Expand Down
2 changes: 1 addition & 1 deletion h2o-r/h2o-package/R/gbm.R
Expand Up @@ -42,7 +42,7 @@
#' max_depth = 3, min_rows = 2)
h2o.gbm <- function(x, y, training_frame, do_classification, ...,
#AUTOGENERATED params
key,
destination_key,
loss = c("AUTO", "bernoulli", "multinomial", "gaussian"),
ntrees = 50,
max_depth = 5,
Expand Down
Expand Up @@ -5,9 +5,9 @@ check.deeplearning_imbalanced <- function(conn) {
Log.info("Test checks if Deep Learning works fine with an imbalanced dataset")

covtype <- h2o.uploadFile(conn, locate("smalldata/covtype/covtype.20k.data"))
hh_imbalanced<-h2o.deeplearning(x=c(1:54),y=55,l1=1e-5,activation="Rectifier",hidden=c(200,200,200),epochs=5,training_frame=covtype,balance_classes=F, do_classification = TRUE)
hh_imbalanced<-h2o.deeplearning(x=c(1:54),y=55,l1=1e-5,activation="Rectifier",loss="CrossEntropy",hidden=c(200,200,200),epochs=5,training_frame=covtype,balance_classes=F, do_classification = TRUE)
print(hh_imbalanced)
hh_balanced<-h2o.deeplearning(x=c(1:54),y=55,l1=1e-5,activation="Rectifier",hidden=c(200,200,200),epochs=5,training_frame=covtype,balance_classes=T, do_classification = TRUE)
hh_balanced<-h2o.deeplearning(x=c(1:54),y=55,l1=1e-5,activation="Rectifier",loss="CrossEntropy",hidden=c(200,200,200),epochs=5,training_frame=covtype,balance_classes=T, do_classification = TRUE)
print(hh_balanced)

#compare error for class 6 (difficult minority)
Expand Down
Expand Up @@ -51,7 +51,7 @@ test.linkFunctions <- function(conn) {
}

print("Create models with link: IDENTITY")
model.h2o.gamma.identity <- h2o.glm(x=myX, y=myY, data=h2o.data, family="gamma", link="identity",alpha=0.5, lambda=0, nfolds=0)
model.h2o.gamma.identity <- h2o.glm(x=myX, y=myY, training_frame=h2o.data, family="gamma", link="identity",alpha=0.5, lambda=0, nfolds=0)
model.R.gamma.identity <- glm(formula=R.formula, data=R.data[,c(1:5,7:9)], family=Gamma(link=identity), na.action=na.omit)

print("Compare model deviances for link function identity")
Expand Down
2 changes: 1 addition & 1 deletion h2o-r/tests/testdir_algos/glm/runit_NOPASS_GLM_prostate.R
Expand Up @@ -17,7 +17,7 @@ test.GLM.prostate <- function(conn) {
# myX = paste(myX, collapse=",")

Log.info(cat("B)H2O GLM (binomial) with parameters:\nX:", myX, "\nY:", myY, "\n"))
prostate.glm.h2o = h2o.glm(y = myY, x = myX, training_frame = prostate.hex, family = "binomial", nfolds = 10, alpha = 0.5)
prostate.glm.h2o = h2o.glm(y = myY, x = myX, training_frame = prostate.hex, family = "binomial", n_folds = 10, alpha = 0.5)
print(prostate.glm.h2o)

# prostate.glm = glm.fit(y = prostate.data[,myY], x = prostate.data[,myX], family = binomial)
Expand Down

0 comments on commit 22067ae

Please sign in to comment.