predict

Pipeline.predict(population_table, peripheral_tables=None, table_name='')[source]

Forecasts on new, unseen data using the trained predictor.

Returns the predictions generated by the pipeline based on population_table and peripheral_tables or writes them into a data base named table_name.

Args:
population_table (getml.data.DataFrame):

Main table corresponding to the population Placeholder instance variable. Its target variable(s) will be ignored.

peripheral_tables (Union[List[getml.data.DataFrame], dict, getml.data.DataFrame]):

Additional tables corresponding to the peripheral Placeholder instance variable. If passed as a list, the order needs to match the order of the corresponding placeholders passed to peripheral.

table_name (str, optional):

If not an empty string, the resulting predictions will be written into the database of the same name. See Unified import interface for further information.

Raises:
IOError: If the pipeline corresponding to the instance

variable name could not be found on the engine or the pipeline could not be fitted.

TypeError: If any input argument is not of proper type.

ValueError: If no valid predictor was set.

KeyError: If an unsupported instance variable is

encountered.

TypeError: If any instance variable is of wrong type.

ValueError: If any instance variable does not match its

possible choices (string) or is out of the expected bounds (numerical).

Return:
numpy.ndarray:

Resulting predictions provided in an array of the (number of rows in population_table, number of targets in population_table).

Note:

Only fitted pipelines (fit()) can be used for prediction.