From 9777541ce4f675376e73c8ce5672089fe4120369 Mon Sep 17 00:00:00 2001 From: wendycwong Date: Wed, 23 Oct 2024 10:18:06 -0700 Subject: [PATCH] continue to add Veronika comments. --- h2o-algos/src/main/java/hex/schemas/HGLMV3.java | 2 +- h2o-py/h2o/estimators/hglm.py | 16 ++++++++-------- h2o-py/h2o/estimators/model_selection.py | 4 ++-- h2o-r/h2o-package/R/hglm.R | 9 ++++----- h2o-r/h2o-package/R/modelselection.R | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/h2o-algos/src/main/java/hex/schemas/HGLMV3.java b/h2o-algos/src/main/java/hex/schemas/HGLMV3.java index 7b1782381346..99438d62c52a 100644 --- a/h2o-algos/src/main/java/hex/schemas/HGLMV3.java +++ b/h2o-algos/src/main/java/hex/schemas/HGLMV3.java @@ -65,7 +65,7 @@ public static final class HGLMParametersV3 extends ModelParametersSchemaV3=1. A value of 0 is only set when only the @@ -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 @@ -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. @@ -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"]``. """ @@ -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]``. @@ -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``. """ @@ -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``. """ diff --git a/h2o-py/h2o/estimators/model_selection.py b/h2o-py/h2o/estimators/model_selection.py index b973055950ed..db44a746c8f6 100644 --- a/h2o-py/h2o/estimators/model_selection.py +++ b/h2o-py/h2o/estimators/model_selection.py @@ -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 @@ -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]``. """ diff --git a/h2o-r/h2o-package/R/hglm.R b/h2o-r/h2o-package/R/hglm.R index 9053d6003f9c..6e4fa2cbed30 100644 --- a/h2o-r/h2o-package/R/hglm.R +++ b/h2o-r/h2o-package/R/hglm.R @@ -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. @@ -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. @@ -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 diff --git a/h2o-r/h2o-package/R/modelselection.R b/h2o-r/h2o-package/R/modelselection.R index 5b136c973adf..a0ae2a49155f 100644 --- a/h2o-r/h2o-package/R/modelselection.R +++ b/h2o-r/h2o-package/R/modelselection.R @@ -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