primeqa.mrc.data_models.eval_prediction_with_processing.EvalPredictionWithProcessing#

class primeqa.mrc.data_models.eval_prediction_with_processing.EvalPredictionWithProcessing(predictions: Union[numpy.ndarray, Tuple[numpy.ndarray]], label_ids: Union[numpy.ndarray, Tuple[numpy.ndarray]], processed_predictions: Union[numpy.ndarray, Tuple[numpy.ndarray]])#

Bases: NamedTuple

Evaluation output (always contains labels), to be used to compute metrics.

Parameters
  • predictions – Predictions of the model.

  • label_ids – Targets to be matched.

  • processed_predictions – Predictions of the model processed for metric use.

Methods

count

Return number of occurrences of value.

index

Return first index of value.

Attributes

label_ids

Alias for field number 1

predictions

Alias for field number 0

processed_predictions

Alias for field number 2

__add__(value, /)#

Return self+value.

__mul__(value, /)#

Return self*value.

count(value, /)#

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)#

Return first index of value.

Raises ValueError if the value is not present.

label_ids: Union[numpy.ndarray, Tuple[numpy.ndarray]]#

Alias for field number 1

predictions: Union[numpy.ndarray, Tuple[numpy.ndarray]]#

Alias for field number 0

processed_predictions: Union[numpy.ndarray, Tuple[numpy.ndarray]]#

Alias for field number 2