MultiModalPredictor.predict¶
- MultiModalPredictor.predict(data: DataFrame | dict | list | str, candidate_data: DataFrame | dict | list | None = None, id_mappings: Dict[str, Dict] | Dict[str, Series] | None = None, as_pandas: bool | None = None, realtime: bool | None = False, save_results: bool | None = None)[source]¶
Predict the label column values for new data.
- Parameters:
data – The data to make predictions for. Should contain same column names as training data and follow same format (except for the label column).
candidate_data – The candidate data from which to search the query data’s matches.
id_mappings – Id-to-content mappings. The contents can be text, image, etc. This is used when data contain the query/response identifiers instead of their contents.
as_pandas – Whether to return the output as a pandas DataFrame(Series) (True) or numpy array (False).
realtime – Whether to do realtime inference, which is efficient for small data (default False). If provided None, we would infer it on based on the data modalities and sample number.
save_results – Whether to save the prediction results (only works for detection now)
- Return type:
Array of predictions, one corresponding to each row in given dataset.