Skip to main content

Module h2o_wave_ml.types

Classes

Model

class Model(model_type: ModelType)

Represents a predictive model.

Instance variables

var endpoint_url : Optional[str]

An endpoint url for a deployed model, if any.

var project_id : Optional[str]

The MLOps project id, if any.

var type

A Wave model engine type.

Methods

predict

def predict(self, data: Optional[List[List[~T]]] = None, file_path: str = '', test_df: Optional[pandas.core.frame.DataFrame] = None, **kwargs) ‑> List[Tuple[]]

Returns the model's predictions for the given input rows.

Args
data
A list of rows of column values. First row has to contain the column headers.
file_path
The file path to the dataset.
test_df
Pandas DataFrame.
Returns

A list of tuples representing predicted values.

Examples
>>> from h2o_wave_ml import build_model >>> model = build_model(...) >>> # Three rows and two columns: >>> model.predict([['ID', 'Letter'], [1, 'a'], [2, 'b'], [3, 'c']]) [(16.6,), (17.8,), (18.9,)]

Ancestors

  • abc.ABC

Subclasses

  • h2o_wave_ml.dai._DAIModel
  • h2o_wave_ml.h2o3._H2O3Model

ModelMetric

class ModelMetric(value, names=None, *, module=None, qualname=None, type=None, start=1)

Determines a metric type.

Class variables

var AUC
var AUCPR
var AUTO
var LOGLOSS
var MAE
var MSE
var RMSE
var RMSLE

Ancestors

  • enum.Enum

ModelType

class ModelType(value, names=None, *, module=None, qualname=None, type=None, start=1)

Determines a type of the model backend.

Class variables

var DAI
var H2O3

Ancestors

  • enum.Enum

TaskType

class TaskType(value, names=None, *, module=None, qualname=None, type=None, start=1)

Determines a machine learning task type.

Class variables

var CLASSIFICATION
var REGRESSION

Ancestors

  • enum.Enum