snorkelflow.client.models.add_predictions
- snorkelflow.client.models.add_predictions(node, *, model_uid, x_uids, predicted_labels=None, predicted_probs=None, user_format=False)
Register predictions generated by models (and optionally, ground truth labels). To learn more about the Label format for your use case you can see Format for ground truth interaction in the SDK.
Parameters
Parameters
Return type
Return type
None
Name Type Default Info node intUID of the node for which we’re adding predictions. model_uid intID corresponding to the model that produced predictions. x_uids Union[List[str], ndarray]UIDs of data points for which predictions were made. predicted_labels Union[List[int], ndarray, None]NonePredicted labels corresponding to x_uids. predicted_probs Union[List[List[float]], ndarray, None]NonePredicted label probabilities corresponding to x_uids. These probabilities should be a list of lists or 2-D numpy array of dimension (len(x_uids)) x (num_classes). All probabilities must be greater than zero and those for each data point should sum to 1. user_format boolFalseTrue if predictions and ground truth are provided in user format, False otherwise.