Skip to main content

Embedding Evaluator

EmbeddingEvaluator is a tool to provide metrics for evaluating different embedding models.

The current version only supports evaluation of evaluate only embeddings of the type:

  • FastText

It evaluates the embeddings based on the two following metrics:

  • Analogy
  • Outlier Detection

Installation

The EmbeddingEvaluator can be installed from PyPi:

pip install embeddingevaluator

Usage

Analogy Metrics

To use the EmbeddingEvaluator to measure different embeddings basead on analogy metrics the user needs a file with the following configuration:

Word 1 Word 2 Word 3 Word 4
1st Pair 1st Word 1st Pair 2nd Word 2nd Pair 1st Word 2nd Pair 2nd Word
Men King Women Queen

Ouliter Detection

To use the EmbeddingEvaluator to measure different embeddings basead on outlier detection metrics the user needs a file with the following configuration:

  • Eight words which are semantically very similar and are all connected with each other by a clear well-known relation. (Cluster)
  • Two words which are very similar to the ones in the cluster.
  • Two words which are similar and related to the ones in the cluster.
  • Two words which are related, but not similar to the ones in the cluster.
  • Two words which are unrelated and not similar to the ones in the cluster.

Initialize the EmbeddingEvaluator

The EmbeddingEvaluator has three parameters as input:

  • Input Metrics:
    A dictionary with a list of the paths for the input evaluation files.

Example:

input_metric = {'analogy': ['file_1', 'file_2'],
                'outlier': ['file_1']}
  • Input Models: A dictionary with the model names and the paths to the models.

Example:

input_model = {'model_1': 'path_1', 
               'model_2': 'path_2'}

Initialize the class:

emb_evaluator = EmbeddingMetrics(input_metric, input_model)

Summary a model's metrics

To summarize the metrics of a model.

emb_evaluator.summary_metrics('model_1') 

Compare models metrics

To compare the metrics of two or more models.

emb_evaluator.compare_models(['model_1', 'model_2']) 

References

Levy, O. and Goldberg, Y.: Linguistic Regularities in Sparse and Explicit Word Representations (2014) Collados, J.C. and Navigli, R.: Find the word that does not belong: A Framework for an Intrinsic Evaluation of Word Vector Representations (2016)

Metadata

Release files for embedding-evaluator 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for embedding-evaluator 0.0.1
File Size Uploaded Provenance
embedding-evaluator-0.0.1.tar.gz 10.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for embedding-evaluator 0.0.1
File Interpreter ABI Platform
embedding_evaluator-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 36.0 kB

Release files / embedding-evaluator-0.0.1.tar.gz

Download URL embedding-evaluator-0.0.1.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ce6b2cb3eb116e1c2ca042ec114c6e2a47a3e4b70946c0df00e01d0520c2c599
BLAKE2b-256 checksum
How to use checksums
dc6f5b775a86832cd7e25ba5f04cac8d9746713cd89a72df35b8520fbe5790f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / embedding_evaluator-0.0.1-py3-none-any.whl

Download URL embedding_evaluator-0.0.1-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66ff2b11a3fd85cee08d89af39aefd6b70e72e07e4ec4c51b296b3ae06e623d0
BLAKE2b-256 checksum
How to use checksums
062e42013b11d6e1bd27103089163525571d1797b82beb01b00e861a92d016b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for embedding-evaluator 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page