Skip to content

Commit

Permalink
continue to add Veronika comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
wendycwong committed Oct 23, 2024
1 parent a879c9d commit 9777541
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion h2o-algos/src/main/java/hex/schemas/HGLMV3.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static final class HGLMParametersV3 extends ModelParametersSchemaV3<HGLMM
values = {"gaussian"}, level = Level.critical)
public GLMParameters.Family family;

@API(help = Set distribution of random effects. Only Gaussian is implemented now.",
@API(help = "Set distribution of random effects. Only Gaussian is implemented now.",
values = {"gaussian"}, level = Level.critical)
public GLMParameters.Family rand_family;

Expand Down
16 changes: 8 additions & 8 deletions h2o-py/h2o/estimators/hglm.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(self,
:param family: Family. Only gaussian is supported now.
Defaults to ``"gaussian"``.
:type family: Literal["gaussian"]
:param rand_family: rand_family. Set distribution of random effects. Only Gaussian is implemented now.
:param rand_family: Set distribution of random effects. Only Gaussian is implemented now.
Defaults to ``None``.
:type rand_family: Literal["gaussian"], optional
:param max_iterations: Maximum number of iterations. Value should >=1. A value of 0 is only set when only the
Expand Down Expand Up @@ -141,7 +141,7 @@ def __init__(self,
will be randomly set in the model building process.
Defaults to ``0.0``.
:type tau_e_var_init: float
:param random_columns: random columns indices for HGLM.
:param random_columns: Random columns indices for HGLM.
Defaults to ``None``.
:type random_columns: List[str], optional
:param method: We only implemented EM as a method to obtain the fixed, random coefficients and the various
Expand All @@ -152,10 +152,10 @@ def __init__(self,
applies to EM method.
Defaults to ``0.001``.
:type em_epsilon: float
:param random_intercept: if true, will allow random component to the GLM coefficients.
:param random_intercept: If true, will allow random component to the GLM coefficients.
Defaults to ``True``.
:type random_intercept: bool
:param group_column: group_column is the column that is categorical and used to generate the groups in HGLM
:param group_column: Group column is the column that is categorical and used to generate the groups in HGLM
Defaults to ``None``.
:type group_column: str, optional
:param gen_syn_data: If true, add gaussian noise with variance specified in parms._tau_e_var_init.
Expand Down Expand Up @@ -411,7 +411,7 @@ def family(self, family):
@property
def rand_family(self):
"""
rand_family. Set distribution of random effects. Only Gaussian is implemented now.
Set distribution of random effects. Only Gaussian is implemented now.
Type: ``Literal["gaussian"]``.
"""
Expand Down Expand Up @@ -515,7 +515,7 @@ def tau_e_var_init(self, tau_e_var_init):
@property
def random_columns(self):
"""
random columns indices for HGLM.
Random columns indices for HGLM.
Type: ``List[str]``.
Expand Down Expand Up @@ -569,7 +569,7 @@ def em_epsilon(self, em_epsilon):
@property
def random_intercept(self):
"""
if true, will allow random component to the GLM coefficients.
If true, will allow random component to the GLM coefficients.
Type: ``bool``, defaults to ``True``.
"""
Expand All @@ -583,7 +583,7 @@ def random_intercept(self, random_intercept):
@property
def group_column(self):
"""
group_column is the column that is categorical and used to generate the groups in HGLM
Group column is the column that is categorical and used to generate the groups in HGLM
Type: ``str``.
"""
Expand Down
4 changes: 2 additions & 2 deletions h2o-py/h2o/estimators/model_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def __init__(self,
lambda_search is set to True, the conditional values above are 1E-8 and 1E-6 respectively.
Defaults to ``-1.0``.
:type gradient_epsilon: float
:param startval: double array to initialize coefficients for GLM.
:param startval: Double array to initialize coefficients for GLM.
Defaults to ``None``.
:type startval: List[float], optional
:param prior: Prior probability for y==1. To be used only for logistic regression iff the data has been sampled
Expand Down Expand Up @@ -900,7 +900,7 @@ def gradient_epsilon(self, gradient_epsilon):
@property
def startval(self):
"""
double array to initialize coefficients for GLM.
Double array to initialize coefficients for GLM.
Type: ``List[float]``.
"""
Expand Down
9 changes: 4 additions & 5 deletions h2o-r/h2o-package/R/hglm.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#' The response must be either a numeric or a categorical/factor variable.
#' If the response is numeric, then a regression model will be trained, otherwise it will train a classification model.
#' @param training_frame Id of the training data frame.
#' @param random_columns random columns indices for HGLM.
#' @param group_column group_column is the column that is categorical and used to generate the groups in HGLM
#' @param random_columns Random columns indices for HGLM.
#' @param group_column Group column is the column that is categorical and used to generate the groups in HGLM
#' @param model_id Destination id for this model; auto-generated if not specified.
#' @param validation_frame Id of the validation data frame.
#' @param ignore_const_cols \code{Logical}. Ignore constant columns. Defaults to TRUE.
Expand All @@ -38,8 +38,7 @@
#' @param plug_values Plug Values (a single row frame containing values that will be used to impute missing values of the
#' training/validation frame, use with conjunction missing_values_handling = PlugValues).
#' @param family Family. Only gaussian is supported now. Must be one of: "gaussian". Defaults to gaussian.
#' @param rand_family rand_family. Set distribution of random effects. Only Gaussian is implemented now. Must be one of:
#' "gaussian".
#' @param rand_family Set distribution of random effects. Only Gaussian is implemented now. Must be one of: "gaussian".
#' @param max_iterations Maximum number of iterations. Value should >=1. A value of 0 is only set when only the model coefficient
#' names and model coefficient dimensions are needed. Defaults to -1.
#' @param initial_fixed_effects An array that contains initial values of the fixed effects coefficient.
Expand All @@ -58,7 +57,7 @@
#' one of: "EM". Defaults to EM.
#' @param em_epsilon Converge if beta/ubeta/tmat/tauEVar changes less (using L-infinity norm) than em esilon. ONLY applies to EM
#' method. Defaults to 0.001.
#' @param random_intercept \code{Logical}. if true, will allow random component to the GLM coefficients. Defaults to TRUE.
#' @param random_intercept \code{Logical}. If true, will allow random component to the GLM coefficients. Defaults to TRUE.
#' @param gen_syn_data \code{Logical}. If true, add gaussian noise with variance specified in parms._tau_e_var_init. Defaults to
#' FALSE.
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion h2o-r/h2o-package/R/modelselection.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#' (of -1.0) indicates: If lambda_search is set to False and lambda is equal to zero, the default value of
#' gradient_epsilon is equal to .000001, otherwise the default value is .0001. If lambda_search is set to True,
#' the conditional values above are 1E-8 and 1E-6 respectively. Defaults to -1.
#' @param startval double array to initialize coefficients for GLM.
#' @param startval Double array to initialize coefficients for GLM.
#' @param prior Prior probability for y==1. To be used only for logistic regression iff the data has been sampled and the mean
#' of response does not reflect reality. Defaults to 0.
#' @param cold_start \code{Logical}. Only applicable to multiple alpha/lambda values. If false, build the next model for next set
Expand Down

0 comments on commit 9777541

Please sign in to comment.