{"id":30220777,"url":"https://github.com/mkirchmeyer/ostar","last_synced_at":"2025-09-11T16:39:10.641Z","repository":{"id":75074983,"uuid":"455171348","full_name":"mkirchmeyer/ostar","owner":"mkirchmeyer","description":"Official Code for \"Mapping conditional distributions for domain adaptation under generalized target shift\" - ICLR2022","archived":false,"fork":false,"pushed_at":"2022-02-03T15:58:25.000Z","size":30,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T09:23:56.300Z","etag":null,"topics":["domain-adaptation","label-shift"],"latest_commit_sha":null,"homepage":"https://openreview.net/forum?id=sPfB2PI87BZ","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkirchmeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-03T13:15:36.000Z","updated_at":"2024-11-08T16:48:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"af669b6c-ccfb-4a03-8401-e13aae3745c3","html_url":"https://github.com/mkirchmeyer/ostar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mkirchmeyer/ostar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchmeyer%2Fostar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchmeyer%2Fostar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchmeyer%2Fostar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchmeyer%2Fostar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkirchmeyer","download_url":"https://codeload.github.com/mkirchmeyer/ostar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkirchmeyer%2Fostar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274671947,"owners_count":25328546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["domain-adaptation","label-shift"],"created_at":"2025-08-14T09:07:52.355Z","updated_at":"2025-09-11T16:39:10.631Z","avatar_url":"https://github.com/mkirchmeyer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mapping Conditional Distributions for Domain Adaptation Under Generalized Target Shift\nThis repository contains the official code of OSTAR in [\"Mapping Conditional Distributions for Domain Adaptation Under Generalized Target Shift\"][1] (ICLR 2022).\n\n### Quickstart\n* Install the requirements `pip install -r requirements.txt`\n* Run training. ex: `python run.py -t 000000000001 -d digits -i 1 -g 0 -s 10`\n* Results are logged in `./results/run_id` where run_id is the id of the run.\n\n### Options\n```\npython run.py [-t MODEL] [-d DATASET] [-i RUN_ITERATIONS] [-g GPUID] [-s SETTING]\n```\n- Choose the model (see Section 5 of the paper for more details):\n  - `-t 100000000000`: `Source`\n  - `-t 010000000000`: `DANN`\n  - `-t 001000000000`: `WD_beta` for beta = 0\n  - `-t 000111100000`: `WD_beta` for beta in {1, 2, 3, 4}\n  - `-t 000000011000`: `MARSg` / `MARSc`\n  - `-t 000000000100`: `IW-WD`\n  - `-t 000000000010`: `WD_gt` with true class-rations\n  - `-t 000000000001`: `OSTAR`\n- Choose the dataset:\n  - `-d digits`: Digits\n  - `-d office`: Office31 and OfficeHome. Requires downloading pre-computed features at https://github.com/jindongwang/transferlearning/blob/master/data/dataset.md\n  - `-d visda`: VisDA12. Requires downloading pre-computed features at http://csr.bu.edu/ftp/visda17/clf/ and preprocessing downloaded file with `prepare_data_visda12.py`\n- Choose the number of runs (e.g. 1 for a single run)\n- Choose the gpu id (e.g. 0)\n- Choose the label shift setting defined in `compare_digits_setting.py`, `compare_office_setting.py`, `compare_visda_setting.py`\n\n## Citation\n```\n@inproceedings{Kirchmeyer2022,\ntitle={Mapping conditional distributions for domain adaptation under generalized target shift},\nauthor={Matthieu Kirchmeyer and Alain Rakotomamonjy and Emmanuel de Bezenac and patrick gallinari},\nbooktitle={International Conference on Learning Representations},\nyear={2022},\nurl={https://openreview.net/forum?id=sPfB2PI87BZ}\n}\n```\n\n[1]: https://openreview.net/forum?id=sPfB2PI87BZ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkirchmeyer%2Fostar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkirchmeyer%2Fostar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkirchmeyer%2Fostar/lists"}