Skip to main content

Python API

Use H2O-3 Secure from Python to train and score machine learning models on your data.

Prerequisites​

  • Java, even when you use H2O-3 Secure from Python. See Java requirements for the supported versions.
  • Python 3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x, 3.12.x, 3.13.x, or 3.14.x. See Requirements for the other system requirements.

Install the Python client​

Follow Install in Python to install the h2o package and its dependencies. Contact enterprise@h2o.ai for the download link.

Connect to H2O-3 Secure​

Call h2o.init() to start a local H2O-3 Secure instance or connect to a running one. Use h2o.connect() to connect to an existing cluster without starting a new one. See Options to initialize H2O-3 Secure in Python for the h2o.init() options.

Run your first model​

Run the built-in GLM demo. It trains a model on sample data and pauses after each step until you press a key.

import h2o
h2o.init()
h2o.demo("glm")

Python module reference​

See the Python module reference for the full list of classes and functions.


Feedback