MultiModalPredictor.predict#
- MultiModalPredictor.predict(data: Union[DataFrame, dict, list, str], candidate_data: Optional[Union[DataFrame, dict, list]] = None, id_mappings: Optional[Union[Dict[str, Dict], Dict[str, Series]]] = None, as_pandas: Optional[bool] = None, realtime: Optional[bool] = None, save_results: Optional[bool] = None)[source]#
Predict values for the label column of 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 None). If not specified, 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.