deephaven.learn¶
Deephaven’s learn module provides utilities for efficient data transfer between Deephaven tables and Python objects, as well as a framework for using popular machine-learning / deep-learning libraries with Deephaven tables.
- class Input(col_names, gather_func)[source]¶
Bases:
object
Input specifies how to gather data from a Deephaven table into an object.
- class Output(col_name, scatter_func, col_type)[source]¶
Bases:
object
Output specifies how to scatter data from an object into a table column.
- learn(table=None, model_func=None, inputs=[], outputs=[], batch_size=None)[source]¶
Learn gathers data from multiple rows of the input table, performs a calculation, and scatters values from the calculation into an output table. This is a common computing paradigm for artificial intelligence, machine learning, and deep learning.
- Parameters:
table (Table) – the Deephaven table to perform computations on.
model_func (Callable) – function that performs computations on the table.
inputs (List[Input]) – list of Input objects that determine how data gets extracted from the table.
outputs (List[Output]) – list of Output objects that determine how data gets scattered back into the results table.
batch_size (int) – maximum number of rows for which model_func is evaluated at once.
- Return type:
- Returns:
a Table with added columns containing the results of evaluating model_func.
- Raises:
DHError –