h2oai / h2o-3

H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
http://h2o.ai
Apache License 2.0
6.9k stars 2k forks source link

Grid printout messed up in R if a hyper parameter contains list(c(..),c(..)) #9813

Closed exalate-issue-sync[bot] closed 1 year ago

exalate-issue-sync[bot] commented 1 year ago

If you grid over hidden, the printout for a deep learning grid is messed up:

{code} library(h2o) h2o.init(nthreads = -1, #Number of threads -1 means use all cores on your machine max_mem_size = "8G") #max mem size is the maximum memory to allocate to H2O loan_csv <- "https://raw.githubusercontent.com/h2oai/app-consumer-loan/master/data/loan.csv" data <- h2o.importFile(loan_csv) # 163,994 rows x 15 columns data$bad_loan <- as.factor(data$bad_loan) #encode the binary repsonse as a factor

Partition the data into training, validation and test sets

splits <- h2o.splitFrame(data, ratios = c(0.7, 0.15), #partition data into 70%, 15%, 15% chunks seed = 1) #setting a seed will guarantee reproducibility train <- splits[[1]] valid <- splits[[3]] test <- splits[[2]]

Identify response and predictor variables

y <- "bad_loan" x <- setdiff(names(data), c(y, "int_rate")) #remove the interest rate column because it's correlated with the outcome

Deeplearning Hyperparamters

activation_opt <- c("Rectifier", "RectifierWithDropout", "Maxout", "MaxoutWithDropout") hidden_opt <- list(c(10,10), c(10,10,10), c(5,5,5)) l1_opt <- c(0, 0.00001, 0.0001, 0.001, 0.01, 0.1) l2_opt <- c(0, 0.00001, 0.0001, 0.001, 0.01, 0.1) hyper_params <- list(activation = activation_opt, hidden = hidden_opt, l1 = l1_opt, l2 = l2_opt) search_criteria <- list(strategy = "RandomDiscrete", max_runtime_secs = 120, max_models = 10)

dl_grid <- h2o.grid("deeplearning", x = x, y = y, grid_id = "dl_grid", training_frame = train, validation_frame = valid, epochs=0.1, seed = 1, hyper_params = hyper_params, search_criteria = search_criteria)

dl_gridperf <- h2o.getGrid(grid_id = "dl_grid", sort_by = "auc", decreasing = TRUE) print(dl_gridperf) #something wrong with printout {code}

exalate-issue-sync[bot] commented 1 year ago

Arno Candel commented: Looks fine in Flow, so the TwoDimTable is OK.

exalate-issue-sync[bot] commented 1 year ago

Arno Candel commented: After 500ddfff584d7d3d33f2e14789a2f5167974616d, the ASCII printout looks good too.

exalate-issue-sync[bot] commented 1 year ago

Arno Candel commented: R's printout: !Screen Shot 2016-04-29 at 2.38.02 PM.png|thumbnail!

Probably does an unlist somewhere...

exalate-issue-sync[bot] commented 1 year ago

Arno Candel commented: Same problem for GBM:

I used: {code} sample_rate_per_class = list( c(0.05,1),c(0.1,1),c(0.15,1),c(0.2,1),c(0.3,1),c(0.4,1), c(0.05,0.8),c(0.1,0.8),c(0.15,0.8),c(0.2,0.8),c(0.3,0.8),c(0.4,0.8) ), {code}

Hyper-Parameter Search Summary: ordered by decreasing auc learn_rate_annealing , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 min_rows , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 15, 25, 15, 15, 15, 10, 25, 10, 25, 20, 5, 5, 10, 25, 15, 25, 10, 2, 1, 10, 5, 2, 10, 1, 15, 5, 10, 20, 2, 15, 20, 2, 15, 20, 10, 5, 20, 1, 1, 15, 1, 10, 2, 2, 1, 5, 5 col_sample_rate_change_per_level , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 1.15, 1, 1.05, 1, 1.15, 1.15, 1.05, 1.2, 1, 1.05, 1.15, 1.1, 1, 1.2, 1.05, 1, 1.05, 1.1, 1.1, 1, 1.1, 1.15, 1, 1, 1, 1, 1.15, 1.15, 1, 1.1, 1.1, 1.1, 1.15, 1.15, 1.15, 1.15, 1.15, 1.05, 1.15, 1.05, 1.1, 1.15, 1, 1.05, 1, 1.15, 1.2 ntrees , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 685, 850, 635, 915, 610, 390, 890, 430, 780, 950, 525, 650, 470, 1075, 1000, 580, 370, 470, 460, 540, 495, 795, 370, 490, 490, 1310, 555, 940, 585, 475, 400, 465, 320, 685, 695, 275, 650, 560, 425, 630, 400, 240, 530, 825, 810, 165, 270

h2o-ops commented 1 year ago

JIRA Issue Migration Info

Jira Issue: PUBDEV-2883 Assignee: Navdeep Reporter: Erin LeDell State: Closed Fix Version: N/A Attachments: Available (Count: 3) Development PRs: N/A

Attachments From Jira

Attachment Name: Screen Shot 2016-04-29 at 2.24.39 PM.png Attached By: Arno Candel File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-2883/Screen Shot 2016-04-29 at 2.24.39 PM.png

Attachment Name: Screen Shot 2016-04-29 at 2.36.05 PM.png Attached By: Arno Candel File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-2883/Screen Shot 2016-04-29 at 2.36.05 PM.png

Attachment Name: Screen Shot 2016-04-29 at 2.38.02 PM.png Attached By: Arno Candel File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-2883/Screen Shot 2016-04-29 at 2.38.02 PM.png