jina.executors.evaluators.embedding

class jina.executors.evaluators.embedding.BaseEmbeddingEvaluator(*args, **kwargs)[source]

Bases: jina.executors.evaluators.BaseEvaluator

A BaseEmbeddingEvaluator evaluates the difference between actual and desired embeddings

evaluate(actual, desired, *args, **kwargs)[source]

” :type actual: array :param actual: the embedding of the document (resulting from an Encoder) :type desired: array :param desired: the expected embedding of the document :return the evaluation metric value for the request document

Return type

float

jina.executors.evaluators.embedding.expand_vector(vec)[source]