# H2O Generalized Linear Model Learner (Regression) - H2O Model Port to variable or table

**URL:** <https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079>\
**Category:** KNIME Analytics Platform\
**Created:** [April 25, 2023, 3:19pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079 "2023-04-25T15:19:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliegreib](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/e9c0ed/32.png) [@elliegreib](https://forum.knime.com/u/elliegreib)\
**Post date:** [April 25, 2023, 3:19pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/1 "2023-04-25T15:19:53Z")

</div>

![image](https://forum-cdn.knime.com/uploads/default/original/3X/b/f/bf1258038740270027ac1c92cb4723985eaf0cae.png)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/b/4/b4bff87b6bec51fed0566e758ac28c7d92723306.png)

I am trying to automatically access the selected lambda (found via lambda search in the H2O Generalized Linear Regression Learner Regression node). It outputs in the H2O Model Port, however I am having trouble automatically accessing it through another node. I was hoping Model to Cell would work, but unfortunately that only outputs the port object: Generalized Linear Modeling.

Does anyone know how to automatically access the selected lambda (5.07E-4 pictured above in the regularization row)?

Thanks!

---

<div class="post-metadata">

**Author:** ![victor\_palacios](https://forum-cdn.knime.com/user_avatar/forum.knime.com/victor_palacios/32/37922_2.png) [@victor\_palacios](https://forum.knime.com/u/victor_palacios)\
**Post date:** [May 9, 2023, 3:20am UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/2 "2023-05-09T03:20:58Z")

</div>

Hello @elliegreib ,

I’ve spoken with our engineers here at KNIME and unfortunately that is not possible. Sorry for the inconvenience.

Please tag my name and ask a follow up question if there is anything else I can do to help.

Best,  
Victor

---

<div class="post-metadata">

**Author:** ![jichaohe](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/e19adc/32.png) [@jichaohe](https://forum.knime.com/u/jichaohe)\
**Post date:** [May 16, 2023, 1:36pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/3 "2023-05-16T13:36:34Z")

</div>

Hi @victor_palacios,

Could you elaborate why it is not possible to get numerical outputs in a table instead of an image?

Thanks,  
Robin

---

<div class="post-metadata">

**Author:** ![kevweath](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/b9e5f3/32.png) [@kevweath](https://forum.knime.com/u/kevweath)\
**Post date:** [May 17, 2023, 8:34pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/4 "2023-05-17T20:34:10Z")

</div>

@victor_palacios - this seems like this should be available in a future enhancement.

The current node calculates a number that would be useful to have available for the automation within the workflow. What needs to be done to create a ticket to look into creating this enhancement?

Kevin

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [May 17, 2023, 10:18pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/5 "2023-05-17T22:18:55Z")

</div>

@jichaohe @jichaohe @elliegreib @kevweath well actually there is a way to do this. One could employ a Python node and H2O.ai in the background to extract a buch of parameters and also the summary from the MOJO model file. Though admittedly not the most elegant way you could have the information in a file 🙂

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/9/493fd392328b0a69e2dde8ead151716ea77cc04d.jpeg)

> **[H2O.ai - extract the summary and parameters from a MOJO model file – mlauber71](https://hub.knime.com/mlauber71/spaces/Machine_Learning/latest/ml_regression/kn_example_ml_regression_h2o_glm_parameter~Dl4NK9LmihH7Tu31)**
>
> H2O.ai - extract the summary and parameters from a MOJO model file

[kn\_example\_ml\_regression\_h2o\_glm\_parameter.knwf](https://forum.knime.com/uploads/short-url/hqgHTMrxn7Zs7acIt22CqEFaGgW.knwf) (222.2 KB)

* * *

If you are interested you might also check out these article and workflows (I plan on having a walkthrough on some H2O.ai AutoML code also …):

> **[KNIME, XGBoost and Optuna for Hyper Parameter Optimization](https://medium.com/@mlxl/knime-xgboost-and-optuna-for-hyper-parameter-optimization-dcf0efdc8ddf)**
>
> TL;DR: Machine Learning gets better with hyper parameter optimisation and a tool like Optuna is there to help. Also you can integrate the…

> **[Hyperparameter optimization for LightGBM — wrapped in KNIME nodes](https://medium.com/low-code-for-advanced-data-science/hyperparameter-optimization-for-lightgbm-wrapped-in-knime-nodes-ddb7ae1d7e2)**
>
> TL;DR: Let a KNIME node find the right hyperparameters for your LightGBM ML model. Also use vtreat and see if that improves the results

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [May 18, 2023, 4:07pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/6 "2023-05-18T16:07:13Z")

</div>

Hi @kevweath! Hope things are going well.

Victor is out for a few days, but I’ll see what I can do about getting a ticket created for this. Thanks for bringing it to our attention!

(And thanks @mlauber71 for the workaround!)

EDIT: Feature request ticket AP-20504 created (thanks @victor_palacios !)

---

<div class="post-metadata">

**Author:** ![jichaohe](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/e19adc/32.png) [@jichaohe](https://forum.knime.com/u/jichaohe)\
**Post date:** [May 19, 2023, 2:26pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/7 "2023-05-19T14:26:28Z")

</div>

Thank you, @mlauber71 ! I learned a few things from your solution here.

We are trying to avoid messing with Python for this project due to its users. For h2o Python API, I know the following 1-line code can export the lambda easily:

H2OGeneralizedLinearEstimator.getLambdaBest(model\_obj)

We are hoping to see it being exported natively in KNIME.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [August 17, 2023, 2:26pm UTC](https://forum.knime.com/t/h2o-generalized-linear-model-learner-regression-h2o-model-port-to-variable-or-table/66079/8 "2023-08-17T14:26:45Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
