Skip to main content

Implementation of the measure Probability of Equal Expected Rank

Project description

Probably of Equal Expected Rank

This package is the Python implementation of the MLIR fairness measure "Probability of Equal Expected Rank" using ir_measures.

How to use it

You can either directly install it from PyPi through

pip install peer_measure

Or install the GitHub version

pip install pip@git+https://github.com/hltcoe/peer_measure

When importing, please import both peer_measure and ir_measures.

from peer_measure import PEER
import ir_measures

Please refer to the documentation of ir_measures for the general usage.

Parameters

PEER takes two required parameters: weights and lang_mapping.

  • weights: a int-to-float dictionary specifying the weight for each relevance level. The weight have be sum up to 1.0.
  • lang_mapping: a str-to-str dictionary with keys being the doc_id and values being the language id of the correspoding document.

You can specify these parameters and the rank cutoff when declaring the measure instance. For example,

measure = PEER(weights={0: 0, 1: 0.5, 2:0, 3: 0.5}, lang_mapping=...)@20

Please refer to our paper for detail definition and implication of the parameters.

Citation

Please consider citing our paper if you use this measure.

@inproceedings{peer,
	author = {Eugene Yang and Thomas Jänich and James Mayfield and Dawn Lawrie},
	title = {Language Fairness in Multilingual Information Retrieval},
	booktitle = {Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR) (Short Paper) (Accepted)},
	year = {2024}, 
    doi = {10.1145/3626772.3657943}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peer_measure-0.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

peer_measure-0.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file peer_measure-0.0.1.tar.gz.

File metadata

  • Download URL: peer_measure-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.5

File hashes

Hashes for peer_measure-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e28f1594576c1d7114a1bcfbc1879a447c79d4b78db024fd9d7dba0d68d5f0e5
MD5 3be98e1f56e0b0532bec8c861967c298
BLAKE2b-256 bf463e40ed65087929c574486266724fb7ac6990d8e2a3f2e5d8d0fc071525d4

See more details on using hashes here.

File details

Details for the file peer_measure-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for peer_measure-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbce0a7898f5e5e7be25c4f97b107a39a9edb47c79ffa54c75892e40a3e84301
MD5 01876915d936dea3d34a1bff62c04c72
BLAKE2b-256 3469b4c268e67a541390cccb45bf86df1615f8489cc3df78328f2e798dd7e3ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page