peer-measure


Namepeer-measure JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/hltcoe/peer_measure
SummaryImplementation of the measure Probability of Equal Expected Rank
upload_time2024-04-22 01:11:50
maintainerNone
docs_urlNone
authorEugene Yang
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
```bash
pip install peer_measure
```

Or install the GitHub version
```bash
pip install pip@git+https://github.com/hltcoe/peer_measure
```

When importing, please import both `peer_measure` and `ir_measures`. 
```python
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,
```python
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. 

```bibtex
@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}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hltcoe/peer_measure",
    "name": "peer-measure",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Eugene Yang",
    "author_email": "eugene.yang@jhu.edu",
    "download_url": "https://files.pythonhosted.org/packages/bf/46/3e40ed65087929c574486266724fb7ac6990d8e2a3f2e5d8d0fc071525d4/peer_measure-0.0.1.tar.gz",
    "platform": null,
    "description": "# Probably of Equal Expected Rank\n\nThis package is the Python implementation of the MLIR fairness measure \n\"Probability of Equal Expected Rank\" using `ir_measures`. \n\n## How to use it\n\nYou can either directly install it from PyPi through\n```bash\npip install peer_measure\n```\n\nOr install the GitHub version\n```bash\npip install pip@git+https://github.com/hltcoe/peer_measure\n```\n\nWhen importing, please import both `peer_measure` and `ir_measures`. \n```python\nfrom peer_measure import PEER\nimport ir_measures\n```\n\nPlease refer to the documentation of `ir_measures` for the general usage. \n\n## Parameters\n\n`PEER` takes two required parameters: `weights` and `lang_mapping`. \n- `weights`: a int-to-float dictionary specifying the weight for each relevance level. The weight have be sum up to 1.0. \n- `lang_mapping`: a str-to-str dictionary with keys being the `doc_id` and values being the language id of the correspoding document. \n\nYou can specify these parameters and the rank cutoff when declaring the measure instance. For example,\n```python\nmeasure = PEER(weights={0: 0, 1: 0.5, 2:0, 3: 0.5}, lang_mapping=...)@20\n```\n\nPlease refer to our paper for detail definition and implication of the parameters. \n\n## Citation\n\nPlease consider citing our paper if you use this measure. \n\n```bibtex\n@inproceedings{peer,\n\tauthor = {Eugene Yang and Thomas J\u00e4nich and James Mayfield and Dawn Lawrie},\n\ttitle = {Language Fairness in Multilingual Information Retrieval},\n\tbooktitle = {Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR) (Short Paper) (Accepted)},\n\tyear = {2024}, \n    doi = {10.1145/3626772.3657943}\n}\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Implementation of the measure Probability of Equal Expected Rank",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/hltcoe/peer_measure"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3469b4c268e67a541390cccb45bf86df1615f8489cc3df78328f2e798dd7e3ae",
                "md5": "01876915d936dea3d34a1bff62c04c72",
                "sha256": "fbce0a7898f5e5e7be25c4f97b107a39a9edb47c79ffa54c75892e40a3e84301"
            },
            "downloads": -1,
            "filename": "peer_measure-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "01876915d936dea3d34a1bff62c04c72",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5501,
            "upload_time": "2024-04-22T01:11:49",
            "upload_time_iso_8601": "2024-04-22T01:11:49.620485Z",
            "url": "https://files.pythonhosted.org/packages/34/69/b4c268e67a541390cccb45bf86df1615f8489cc3df78328f2e798dd7e3ae/peer_measure-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf463e40ed65087929c574486266724fb7ac6990d8e2a3f2e5d8d0fc071525d4",
                "md5": "3be98e1f56e0b0532bec8c861967c298",
                "sha256": "e28f1594576c1d7114a1bcfbc1879a447c79d4b78db024fd9d7dba0d68d5f0e5"
            },
            "downloads": -1,
            "filename": "peer_measure-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3be98e1f56e0b0532bec8c861967c298",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5089,
            "upload_time": "2024-04-22T01:11:50",
            "upload_time_iso_8601": "2024-04-22T01:11:50.993787Z",
            "url": "https://files.pythonhosted.org/packages/bf/46/3e40ed65087929c574486266724fb7ac6990d8e2a3f2e5d8d0fc071525d4/peer_measure-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 01:11:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hltcoe",
    "github_project": "peer_measure",
    "github_not_found": true,
    "lcname": "peer-measure"
}
        
Elapsed time: 0.26141s