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 int
UID of the node for which we’re adding predictions. model_uid int
ID 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]
None
Predicted labels corresponding to x_uids. predicted_probs Union[List[List[float]], ndarray, None]
None
Predicted 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 bool
False
True if predictions and ground truth are provided in user format, False otherwise.