angle_emb.evaluation

Classes

CorrelationEvaluator

Module Contents

class angle_emb.evaluation.CorrelationEvaluator(text1: List[str], text2: List[str], labels: List[float], batch_size: int = 32)[source]

Bases: object

text1[source]
text2[source]
labels[source]
batch_size = 32[source]
__call__(model: angle_emb.base.AngleBase, show_progress: bool = True, **kwargs) dict[source]

Evaluate the model on the given dataset.

Parameters:
  • model – AnglE, the model to evaluate.

  • show_progress – bool, whether to show a progress bar during evaluation.

  • kwargs – Additional keyword arguments to pass to the encode method of the model.

Returns:

dict, The evaluation results.

list_all_metrics() List[str][source]

Get a list of all the metrics that can be computed by this evaluator.

Returns:

List[str], A list of all the metrics that can be computed by this evaluator.