Skip to content

Commit

Permalink
GH-15809: add new parameter to the constructor, and add new constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
syzonyuliia-h2o committed Jan 26, 2024
1 parent 78a60a8 commit 3a45e5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion h2o-algos/src/main/java/hex/glm/GLMModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,11 @@ public GLMParameters(Family f, Link l, double [] lambda, double [] alpha, double

public GLMParameters(Family f, Link l, double [] lambda, double [] alpha, double twVar, double twLnk,
String[] interactions, double theta){
this(f,l,lambda,alpha,twVar,twLnk,interactions, theta, Double.NaN);
}

public GLMParameters(Family f, Link l, double [] lambda, double [] alpha, double twVar, double twLnk,
String[] interactions, double theta, double dispersion_estimated){
this._lambda = lambda;
this._alpha = alpha;
this._tweedie_variance_power = twVar;
Expand All @@ -736,7 +741,7 @@ public GLMParameters(Family f, Link l, double [] lambda, double [] alpha, double
_link = l;
this._theta=theta;
this._invTheta = 1.0/theta;
this._dispersion_estimated = _init_dispersion_parameter;
this._dispersion_estimated = Double.isNaN(dispersion_estimated) ? _init_dispersion_parameter : dispersion_estimated;
}

public final double variance(double mu){
Expand Down

0 comments on commit 3a45e5c

Please sign in to comment.