Other

Connection

An H2OConnection represents the latest active handle to a cloud. No more than a single H2OConnection object will be active at any one time.

class h2o.connection.H2OConnection(ip='localhost', port=54321, size=1, start_h2o=False, enable_assertions=False, license=None, max_mem_size_GB=None, min_mem_size_GB=None, ice_root=None, strict_version_check=False)[source]

Bases: object

H2OConnection is a class that represents a connection to the H2O cluster. It is specified by an IP address and a port number.

Objects of type H2OConnection are not instantiated directly!

This class contains static methods for performing the common REST methods GET, POST, and DELETE.

static check_conn()[source]
static current_connection()[source]
static delete(url_suffix, **kwargs)[source]
static get(url_suffix, **kwargs)[source]
static get_json(url_suffix, **kwargs)[source]
static get_session_id()[source]
static ip()[source]
static port()[source]
static post(url_suffix, file_upload_info=None, **kwargs)[source]
static post_json(url_suffix, file_upload_info=None, **kwargs)[source]
static rest_version()[source]
static session_id()[source]
h2o.connection.as_int(the_int)[source]
h2o.connection.get_human_readable_size(num)[source]
h2o.connection.get_human_readable_time(epochTimeMillis)[source]
h2o.connection.is_int(possible_int)[source]

Expr

This module contains code for the lazy expression DAG.

class h2o.expr.Expr(op, left=None, rite=None, length=None)[source]

Bases: object

Expr objects have a few different flavors:
  1. A pending to-be-computed BigData expression. Does _NOT_ have a Key
  2. An already computed BigData expression. Does have a key
  3. A small-data computation, pending or not.

Pending computations point to other Expr objects in a DAG of pending computations. Pointed at by at most one H2OVec (during construction) and no others. If that H2OVec goes dead, this computation is known to be an internal temp, used only in building other Expr objects.

data()[source]
debug()[source]
Returns:The structure of this object without evaluating.
dim()[source]

Eagerly evaluate the Expr. If it’s an H2OFrame, return the number of rows and columns.

Returns:The number of rows and columns in the H2OFrame as a list [rows, cols].
eager()[source]

This forces a top-level execution, as needed, and produces a top-level result locally. Frames are returned and truncated to the standard preview response provided by rapids - 100 rows X 200 cols.

Returns:A key pointing to the big data object
get_len()[source]
is_computed()[source]
is_local()[source]
is_pending()[source]
is_remote()[source]
is_slice()[source]
left()[source]
logical_negation()[source]
max()[source]
Returns:A lazy Expr representing the variance of this H2OVec.
mean()[source]
Returns:A lazy Expr representing the mean of this H2OVec.
median()[source]
Returns:A lazy Expr representing the median of this H2OVec.
min()[source]
Returns:A lazy Expr representing the standard deviation of this H2OVec.
multi_dim_slice_cmd(child)[source]
multi_dim_slice_cols_cmd(child)[source]
multi_dim_slice_data_cmd(child)[source]
multi_dim_slice_rows_cmd(child)[source]
name()[source]
op()[source]
rite()[source]
sd()[source]
Returns:A lazy Expr representing the standard deviation of this H2OVec.
set_len(i)[source]
show(noprint=False)[source]

Evaluate and print.

Returns:None
sum()[source]
Returns:A lazy Expr representing the variance of this H2OVec.
summary()[source]
var()[source]
Returns:A lazy Expr representing the variance of this H2OVec.
vecname()[source]