You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there may be an issue but not sure. Here is a minimal example. If histogram_type = "Random" shouldn't the root node split threshold vary if ran multiple times?
{code:r}library(data.table) #1.12.8
library(zipcode) #1.0
library(h2o) #3.30.0.4
data("zipcode")
zipcode <- data.table(zipcode)[state=="WY"] #choosing a squarish state
Jira Issue: PUBDEV-7880
Assignee: Michal Kurka
Reporter: Joseph Granados
State: Resolved
Fix Version: 3.32.0.3
Attachments: N/A
Development PRs: Available
I think there may be an issue but not sure. Here is a minimal example. If histogram_type = "Random" shouldn't the root node split threshold vary if ran multiple times?
{code:r}library(data.table) #1.12.8
library(zipcode) #1.0
library(h2o) #3.30.0.4
data("zipcode")
zipcode <- data.table(zipcode)[state=="WY"] #choosing a squarish state
Code to produce loss ratio data
loss_indicator <- sample(0:1,10000,replace=TRUE,prob=c(0.1,0.9))
loss_ratio <- data.table(
earned_premium = runif(10000,0,10000),
losses = runif(10000,0,3500) * loss_indicator,
zip = sample(as.numeric(zipcode$zip),10000,replace=TRUE)
)
loss_ratio[,lr:=losses/earned_premium]
#########
loss_ratio <- merge(
loss_ratio,
zipcode[,.(zip=as.numeric(zip),latitude,longitude)],
by="zip"
)
h2o.init()
lr.hex <- as.h2o(loss_ratio)
split_points <- numeric(length = 100)
for (i in 1:100) {
terr_gbm1 <- h2o.gbm(
x=c("latitude","longitude"),
y="lr",
training_frame = lr.hex[lr.hex$earned_premium>0,],
distribution = "tweedie",
tweedie_power = 1.5,
nbins_top_level = 2,
nbins=2,
histogram_type = "Random",
stopping_rounds = 3,
score_tree_interval = 3,
stopping_tolerance = 1e-5
)
first_tree1 <- h2o.getModelTree(terr_gbm1,1)
split_points[i] <- first_tree1@thresholds[1]
}
should be a variety of split thresholds?
unique(split_points){code}
The text was updated successfully, but these errors were encountered: