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