neulab/docprompting-conala huggingface dataset:
tf.compat.v1.metrics.mean Computes the (weighted) mean of the given values. 
tf.compat.v1.metrics.mean(
    values, weights=None, metrics_collections=None, updates_collections=None,
    name=None
)
 The mean function creates two local variables, total and count that are used to compute the average of values. This average is ultimately returned as mean which is an idempotent operation that simply divides total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the mean. update_op increments total with the reduced sum of the product of values and weights, and it increments count with the reduced sum of weights. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  values   A Tensor of arbitrary dimensions.  
  weights   Optional Tensor whose rank is either 0, or the same rank as values, and must be broadcastable to values (i.e., all dimensions must be either 1, or the same as the corresponding values dimension).  
  metrics_collections   An optional list of collections that mean should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  mean   A Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately and whose value matches mean_value.   
 


 Raises
  ValueError   If weights is not None and its shape doesn't match values, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.mean_absolute_error Computes the mean absolute error between the labels and predictions. 
tf.compat.v1.metrics.mean_absolute_error(
    labels, predictions, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The mean_absolute_error function creates two local variables, total and count that are used to compute the mean absolute error. This average is weighted by weights, and it is ultimately returned as mean_absolute_error: an idempotent operation that simply divides total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the mean_absolute_error. Internally, an absolute_errors operation computes the absolute value of the differences between predictions and labels. Then update_op increments total with the reduced sum of the product of weights and absolute_errors, and it increments count with the reduced sum of weights If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor of the same shape as predictions.  
  predictions   A Tensor of arbitrary shape.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that mean_absolute_error should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  mean_absolute_error   A Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately and whose value matches mean_absolute_error.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.mean_cosine_distance Computes the cosine distance between the labels and predictions. 
tf.compat.v1.metrics.mean_cosine_distance(
    labels, predictions, dim, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The mean_cosine_distance function creates two local variables, total and count that are used to compute the average cosine distance between predictions and labels. This average is weighted by weights, and it is ultimately returned as mean_distance, which is an idempotent operation that simply divides total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the mean_distance. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor of arbitrary shape.  
  predictions   A Tensor of the same shape as labels.  
  dim   The dimension along which the cosine distance is computed.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension). Also, dimension dim must be 1.  
  metrics_collections   An optional list of collections that the metric value variable should be added to.  
  updates_collections   An optional list of collections that the metric update ops should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  mean_distance   A Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.mean_iou Calculate per-step mean Intersection-Over-Union (mIOU). 
tf.compat.v1.metrics.mean_iou(
    labels, predictions, num_classes, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 Mean Intersection-Over-Union is a common evaluation metric for semantic image segmentation, which first computes the IOU for each semantic class and then computes the average over classes. IOU is defined as follows: IOU = true_positive / (true_positive + false_positive + false_negative). The predictions are accumulated in a confusion matrix, weighted by weights, and mIOU is then calculated from it. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the mean_iou. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor of ground truth labels with shape [batch size] and of type int32 or int64. The tensor will be flattened if its rank > 1.  
  predictions   A Tensor of prediction results for semantic labels, whose shape is [batch size] and type int32 or int64. The tensor will be flattened if its rank > 1.  
  num_classes   The possible number of labels the prediction task can have. This value must be provided, since a confusion matrix of dimension = [num_classes, num_classes] will be allocated.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that mean_iou should be added to.  
  updates_collections   An optional list of collections update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  mean_iou   A Tensor representing the mean intersection-over-union.  
  update_op   An operation that increments the confusion matrix.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.mean_per_class_accuracy Calculates the mean of the per-class accuracies. 
tf.compat.v1.metrics.mean_per_class_accuracy(
    labels, predictions, num_classes, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 Calculates the accuracy for each class, then takes the mean of that. For estimation of the metric over a stream of data, the function creates an update_op operation that updates the accuracy of each class and returns them. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor of ground truth labels with shape [batch size] and of type int32 or int64. The tensor will be flattened if its rank > 1.  
  predictions   A Tensor of prediction results for semantic labels, whose shape is [batch size] and type int32 or int64. The tensor will be flattened if its rank > 1.  
  num_classes   The possible number of labels the prediction task can have. This value must be provided, since two variables with shape = [num_classes] will be allocated.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that mean_per_class_accuracy' should be added to. </td> </tr><tr> <td>updates_collections</td> <td> An optional list of collectionsupdate_opshould be added to. </td> </tr><tr> <td>name`   An optional variable_scope name.   
 


 Returns
  mean_accuracy   A Tensor representing the mean per class accuracy.  
  update_op   An operation that updates the accuracy tensor.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.mean_relative_error Computes the mean relative error by normalizing with the given values. 
tf.compat.v1.metrics.mean_relative_error(
    labels, predictions, normalizer, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The mean_relative_error function creates two local variables, total and count that are used to compute the mean relative absolute error. This average is weighted by weights, and it is ultimately returned as mean_relative_error: an idempotent operation that simply divides total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the mean_reative_error. Internally, a relative_errors operation divides the absolute value of the differences between predictions and labels by the normalizer. Then update_op increments total with the reduced sum of the product of weights and relative_errors, and it increments count with the reduced sum of weights. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor of the same shape as predictions.  
  predictions   A Tensor of arbitrary shape.  
  normalizer   A Tensor of the same shape as predictions.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that mean_relative_error should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  mean_relative_error   A Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately and whose value matches mean_relative_error.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.mean_squared_error Computes the mean squared error between the labels and predictions. 
tf.compat.v1.metrics.mean_squared_error(
    labels, predictions, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The mean_squared_error function creates two local variables, total and count that are used to compute the mean squared error. This average is weighted by weights, and it is ultimately returned as mean_squared_error: an idempotent operation that simply divides total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the mean_squared_error. Internally, a squared_error operation computes the element-wise square of the difference between predictions and labels. Then update_op increments total with the reduced sum of the product of weights and squared_error, and it increments count with the reduced sum of weights. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   A Tensor of the same shape as predictions.  
  predictions   A Tensor of arbitrary shape.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that mean_squared_error should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  mean_squared_error   A Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately and whose value matches mean_squared_error.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.mean_tensor Computes the element-wise (weighted) mean of the given tensors. 
tf.compat.v1.metrics.mean_tensor(
    values, weights=None, metrics_collections=None, updates_collections=None,
    name=None
)
 In contrast to the mean function which returns a scalar with the mean, this function returns an average tensor with the same shape as the input tensors. The mean_tensor function creates two local variables, total_tensor and count_tensor that are used to compute the average of values. This average is ultimately returned as mean which is an idempotent operation that simply divides total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the mean. update_op increments total with the reduced sum of the product of values and weights, and it increments count with the reduced sum of weights. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  values   A Tensor of arbitrary dimensions.  
  weights   Optional Tensor whose rank is either 0, or the same rank as values, and must be broadcastable to values (i.e., all dimensions must be either 1, or the same as the corresponding values dimension).  
  metrics_collections   An optional list of collections that mean should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  mean   A float Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately and whose value matches mean_value.   
 


 Raises
  ValueError   If weights is not None and its shape doesn't match values, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.percentage_below Computes the percentage of values less than the given threshold. 
tf.compat.v1.metrics.percentage_below(
    values, threshold, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The percentage_below function creates two local variables, total and count that are used to compute the percentage of values that fall below threshold. This rate is weighted by weights, and it is ultimately returned as percentage which is an idempotent operation that simply divides total by count. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the percentage. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  values   A numeric Tensor of arbitrary size.  
  threshold   A scalar threshold.  
  weights   Optional Tensor whose rank is either 0, or the same rank as values, and must be broadcastable to values (i.e., all dimensions must be either 1, or the same as the corresponding values dimension).  
  metrics_collections   An optional list of collections that the metric value variable should be added to.  
  updates_collections   An optional list of collections that the metric update ops should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  percentage   A Tensor representing the current mean, the value of total divided by count.  
  update_op   An operation that increments the total and count variables appropriately.   
 


 Raises
  ValueError   If weights is not None and its shape doesn't match values, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.precision Computes the precision of the predictions with respect to the labels. 
tf.compat.v1.metrics.precision(
    labels, predictions, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The precision function creates two local variables, true_positives and false_positives, that are used to compute the precision. This value is ultimately returned as precision, an idempotent operation that simply divides true_positives by the sum of true_positives and false_positives. For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the precision. update_op weights each prediction by the corresponding value in weights. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   The predicted values, a Tensor of arbitrary dimensions. Will be cast to bool.  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that precision should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  precision   Scalar float Tensor with the value of true_positives divided by the sum of true_positives and false_positives.  
  update_op   Operation that increments true_positives and false_positives variables appropriately and whose value matches precision.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.
tf.compat.v1.metrics.precision_at_thresholds Computes precision values for different thresholds on predictions. 
tf.compat.v1.metrics.precision_at_thresholds(
    labels, predictions, thresholds, weights=None, metrics_collections=None,
    updates_collections=None, name=None
)
 The precision_at_thresholds function creates four local variables, true_positives, true_negatives, false_positives and false_negatives for various values of thresholds. precision[i] is defined as the total weight of values in predictions above thresholds[i] whose corresponding entry in labels is True, divided by the total weight of values in predictions above thresholds[i] (true_positives[i] / (true_positives[i] + false_positives[i])). For estimation of the metric over a stream of data, the function creates an update_op operation that updates these variables and returns the precision. If weights is None, weights default to 1. Use weights of 0 to mask values.
 


 Args
  labels   The ground truth values, a Tensor whose dimensions must match predictions. Will be cast to bool.  
  predictions   A floating point Tensor of arbitrary shape and whose values are in the range [0, 1].  
  thresholds   A python list or tuple of float thresholds in [0, 1].  
  weights   Optional Tensor whose rank is either 0, or the same rank as labels, and must be broadcastable to labels (i.e., all dimensions must be either 1, or the same as the corresponding labels dimension).  
  metrics_collections   An optional list of collections that auc should be added to.  
  updates_collections   An optional list of collections that update_op should be added to.  
  name   An optional variable_scope name.   
 


 Returns
  precision   A float Tensor of shape [len(thresholds)].  
  update_op   An operation that increments the true_positives, true_negatives, false_positives and false_negatives variables that are used in the computation of precision.   
 


 Raises
  ValueError   If predictions and labels have mismatched shapes, or if weights is not None and its shape doesn't match predictions, or if either metrics_collections or updates_collections are not a list or tuple.  
  RuntimeError   If eager execution is enabled.