0 ×

Workflow

H2O Parameter Optimization

This tutorial shows how to train multiple H2O Models in KNIME using parameter optimization (grid search) and extract the optimal algorithm settings for the training of the final model. We will train Gradient Boosting Machines for binominal classification using a grid of two different GBM parameters.

1. Prepare:

Load and Import data to H2O.

2. Optimization:

To train models with parameter optimization, we create a Loop using the KNIME Node "Parameter Optimization Loop Start" (Analytics - Mining). In this Nodes' settings we can define the optimization grid: For this example we will optimize the GBM algorithm parameters "Number of trees" and "Max tree depth". We use brute force optimization, meaning that there will be as many iteration as there are parameter combinations defined in the Parameter Optimization Loop Start Node. The "Loop End" Node collects the scored metrics of all optimization loop iterations. In order to extract the optimal algorithm parameters, we sort the collected rows by several metrics and filter the top row.

3. Learn Models, do prediction and scoring in Parameter Optimization Loop:

For each combination of parameters, a GBM Model is build by H2O using the "Number of Trees" and "Max tree depth" parameters of the corresponding loop iteration and the model accuracy metrics are scored.

4. Train final model

Finally, we use the optimal parameters to predict new data.

H2Omachine learningparameter optimizationgrid search

Get this workflow from the following link: Download

06_H2O_GBM_parameter_optimization consists of the following 18 nodes(s):

- Table to H2O (2)
- H2O Predictor (Classification) (2)
- H2O Gradient Boosting Machine Learner (2)
- File Reader (2) Streamable
- Variable to Table Row (1)
- Table Row to Variable (1)
- Sorter (1)
- Row Filter (1) Streamable
- Parameter Optimization Loop Start (1)
- Loop End (1)
- H2O Partitioning (1)
- H2O Local Context (1)
- H2O Binomial Scorer (1)
- Cross Joiner (1) Streamable

06_H2O_GBM_parameter_optimization contains nodes provided by the following 4 plugin(s):

Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter, or chat on Gitter!

Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.