Skip to content

Commit

Permalink
log more information about Tweedie dispersion estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfryda committed Jan 19, 2024
1 parent 5e8fc7f commit 60297c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions h2o-algos/src/main/java/hex/glm/DispersionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public static double estimateTweedieDispersionOnly(GLMModel.GLMParameters parms,
logLikelihoodSanityChecks.add(bestLogLikelihoodFromSanityCheck);
dispersionsSanityChecks.add(dispersionCurr);
for (int index = 0; index < parms._max_iterations_dispersion; index++) {
Log.info("Tweedie dispersion ML estimation [iter="+index+", phi="+dispersionCurr+"]");
tDispersion.updateDispersionP(dispersionCurr);
DispersionTask.ComputeMaxSumSeriesTsk computeTask = new DispersionTask.ComputeMaxSumSeriesTsk(tDispersion,
parms, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ nll <- function(simData, mu, phi, p) {
train_models <- function(simData, tweedie_p, phi) {
simDataH2O <- as.h2o(simData)
simData <- as.data.frame(simData)

offset <- simData[1, "offset_col"]
hfit <- h2o.glm(
training_frame = simDataH2O,
x = 'xt',
y = 'yr',
weights_column = 'weight',
offset_column = "offset_col",
model_id = 'simDatatest',
model_id = paste0("TweedieDispersionMLE_p", tweedie_p,"_phi", phi, "_offset", offset),
family = "tweedie",
link = "tweedie",
tweedie_link_power = 0,
Expand Down

0 comments on commit 60297c7

Please sign in to comment.