An implementation of the generalized merged distance to evaluate entity resolution
Project description
entity-resolution-evaluation
A python package to evaluate entity resolution
This package allows to evaluate entity resolution by efficiently computing several state of the art metrics : basic merge distance, precision, recall, variation of information. It's using the slice algorithm from the paper :
Menestrina, David and Whang, Steven Euijong and Garcia-Molina, Hector (2010) Evaluating Entity Resolution Results http://ilpubs.stanford.edu:8090/975/3/ERMetricVLDB.pdf
Getting Started
Installing
pip install entity-resolution-evaluation
Testing
Evaluate your resolution R against the gold standard S using a metric.
Examples
S = [[0, 1], [2, 3, 4], [5]]
R = [[0, 1, 2], [3, 4], [5]]
evaluate(R,S, 'bmd')
# returns 2
To go from R to S, you have to do 1 split and 1 merge.
evaluate(R,S,'precision')
# returns 0.5,
Half of the pairs of R are incorrect. (0,2) and (1,2) are incorrect. (0,1) and (3,4) are correct
evaluate(R,S,'recall')
# returns 0.5
Half of the pairs of S are present in R. (0,1) and (3,4) are present. (2,3) and (2,4) are absent.
evaluate(R,S,'variation of information')
# returns 0.6365141682948129
Metrics
You can currently compute the following metrics :
metric | value if perfect | bounds | intepretation |
---|---|---|---|
'bmd' | 0 | [0,infinity] | basic merge distance : the number of split and merge necessary to go from R to S |
'precision' | 1 | [0,1] | proportion of pairs in R present in S |
'recall' | 1 | [0,1] | proportion of pairs in S present in R |
'f1' | 1 | [0,1] | harmonic mean of precision and recall |
'variation_of_information' | 0 | [0,infinity] | amount of information that is lost and added to go from R to S |
Credits
Please visit the Hopkins mission page for more information
License
MIT License
Copyright (c) 2018 Ministère de l'Action et des Comptes Publics, Paul Boosz, Benoît Guigal
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file entity_resolution_evaluation-0.0.2.tar.gz
.
File metadata
- Download URL: entity_resolution_evaluation-0.0.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77609c039f46e6d56175f9e7e078b266cb8d7abe56ed0a061166a17f1863a22b |
|
MD5 | 826809dad9199eec7fb176432b442a70 |
|
BLAKE2b-256 | caf0651ef32b8a6ae6fa1398330d7584cb4d2e8aff15bf55d0f6235d1e3deec4 |
File details
Details for the file entity_resolution_evaluation-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: entity_resolution_evaluation-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75a91187fc873d7d041a45679beaf429d56ff09d07e7d0b1b3c99e023d6df17b |
|
MD5 | 9080435f97862328f287372b5f15dc14 |
|
BLAKE2b-256 | 4cce01297dcfa2e1b941994535a6e0b7544c448b4e35af6c0e8dfe824c6e7422 |