1
$\begingroup$

What does the "beta_given" column do in the h2o.glm beta_constraints parameter?

h2o is an open source library for machine learning algorithms. There are several online examples on how to install the library on different systems, and on how to apply it. The developer's site for h2o offers a summary description of algorithms; and there is at least one published publication Practical Machine Learning with h2o.

The description for generalized linear models can be found in the page for h2o.glm. In that page, one can find the following explanation of the parameter beta_constraints:

beta_constraints: Specify a dataset to use beta constraints. The selected frame is used to constrain the coefficient vector to provide upper and lower bounds. The dataset must contain a names column with valid coefficient names.

There is a page for beta_constraints which adds detail on the structure of the dataset: it must have columns: 'names', 'lower_bounds', 'upper_bounds', 'beta_given', 'beta_start', 'rho', 'mean', and 'std_dev'.

'Names' is mandatory, most of the rest are optional. The page contains succinct explanations on each column. 'names', 'lower_bounds', 'upper_bounds' contain information similar to the analogous parameters in R's glmnet function, albeit in different format. The explanation for beta_given reads:

beta_given: (optional) Specifies the given solution. This works as a base in proximal penalty.

I suspect that h2o.glm minimizes:
$$ -{\rm loglikelihood} + \lambda(\alpha\|\beta\|_1 + (1-\alpha)\|\beta\|_2^2) + \frac{1}{2\rho}\|\beta - \text{beta_given}\|_2^2 $$ over the model parameter vector $\beta$, subject to lower and upper bound constraints. The parameters $\lambda$ and $\alpha$ are fixed in the optimization over $\beta$, with values taken from a grid search set.

The factor involving $\rho$ might be $\frac{\rho}{2}$ instead of $\frac{2}{\rho}$. The page makes reference to Proximal Algorithms by Boyd et al., in which the term with the $\ell_2$ norm is multiplied by $1/(2\lambda)$ (the use of $\lambda$ there is not the same as in h2o.glm).

The formula above is clearer than the description of 'beta_given' in the help, or if not clearer, at least less ambiguous, and certainly succinct, which makes me doubt it is correct, thus my question.

Being an open source library, it is possible to look at the code and answer the question. I have not attempted to do that. I have limited myself to online searches.

$\endgroup$
5
  • $\begingroup$ Can you provide any more context for this? I don't think this is answerable at present. $\endgroup$ Commented May 11, 2018 at 1:26
  • $\begingroup$ I added to my question, but I am afraid I did not add context. It is a question about a parameter in open source software... $\endgroup$ Commented May 12, 2018 at 9:37
  • $\begingroup$ At this point, I don't know what your question is. Eg, I don't see a "?" anywhere. In addition, on the page you link to, I don't see "beta_given" anywhere. The things you describe seem to correspond to what is called "beta_constraints" on the page where I land. I don't know if it's different for you, but that would be really strange. $\endgroup$ Commented May 13, 2018 at 1:26
  • $\begingroup$ I corrected the label of the link. The "?" is at the end of the first sentence. The tag "h2o" exists in the forum; a search with keyword "h2o" gives instances of question of the form "what is the meaning of xxx" or "how is xxx calculated?". There are question answered by Erin LeDell, who is the Chief ML Scientist at H2O.ai. I posted my question here hopping it will be answered by someone knowledgeable about h2o, and so that the answer can be easily found by other h2o users. I disagree with your assessment that the question is off-topic for the forum. $\endgroup$ Commented May 14, 2018 at 16:04
  • $\begingroup$ You're right, the "?" is at the top. I'm not sure how I missed it (& I could swear I did a ctrl-f search). I apologize for that. Note that I didn't close this as off topic, I closed it as unclear. I do think it's a little clearer now. (& I have attempted to clarify the text further--please be sure it still says what you want it to.) The off-topic-ness is a little ambiguous. This looks like a question about how the software works, which is generally off topic here. But I think this is actually a statistical / machine-learning question in disguise. As such, I'll reopen & we'll see how it goes. $\endgroup$ Commented May 14, 2018 at 19:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.