predict

Pipeline.predict(population_table: Union[DataFrame, View, Subset], peripheral_tables: Optional[Union[Dict[str, Union[DataFrame, View]], Sequence[Union[DataFrame, View]]]] = None, table_name: str = '') Optional[ndarray[Any, dtype[float64]]][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 (DataFrame, View or Subset):

Main table containing the target variable(s) and corresponding to the population Placeholder instance variable.

peripheral_tables (List[DataFrame or View], dict, DataFrame or View, optional):

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.

If you pass a Subset to population_table, the peripheral tables from that subset will be used. If you use a Container, StarSchema or TimeSeries, that means you are passing a Subset.

table_name (str, optional):

If not an empty string, the resulting predictions will be written into a table in a database. Refer to Unified import interface for further information.

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.