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 view Label Spaces GT formats.
- Parameters:
node (
int
) – UID of the node for which we’re adding predictionsmodel_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
], default:None
) – Predicted labels corresponding to x_uids.predicted_probs (
Union
[List
[List
[float
]],ndarray
,None
], default: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
, default:False
) – True if predictions and ground truth are provided in user format, False otherwise.
- Return type:
None