{"id":23478340,"url":"https://github.com/wnjxyk/ftta","last_synced_at":"2025-10-31T04:30:38.566Z","repository":{"id":269508184,"uuid":"901621746","full_name":"WNJXYK/FTTA","owner":"WNJXYK","description":"Fully Test-time Adaptation for Tabular Data","archived":false,"fork":false,"pushed_at":"2025-02-12T14:11:34.000Z","size":15285,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T15:29:38.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/WNJXYK.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}},"created_at":"2024-12-11T02:19:30.000Z","updated_at":"2025-02-12T14:11:37.000Z","dependencies_parsed_at":"2024-12-24T04:40:15.284Z","dependency_job_id":null,"html_url":"https://github.com/WNJXYK/FTTA","commit_stats":null,"previous_names":["wnjxyk/ftta"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FFTTA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FFTTA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FFTTA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WNJXYK%2FFTTA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WNJXYK","download_url":"https://codeload.github.com/WNJXYK/FTTA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239103009,"owners_count":19582070,"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","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":[],"created_at":"2024-12-24T19:18:47.476Z","updated_at":"2025-10-31T04:30:30.208Z","avatar_url":"https://github.com/WNJXYK.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fully Test-time Adaptation for Tabular Data\n\u003cp align=\"center\"\u003e\n🏠 \u003ca href=\"\" target=\"_blank\"\u003eHomepage\u003c/a\u003e • 📃 \u003ca href=\"https://arxiv.org/abs/2412.10871\" target=\"_blank\"\u003ePaper\u003c/a\u003e\u003cbr\u003e\n\u003c/p\u003e\n\nThis is the official code for paper titled: Fully Test-time Adaptation for Tabular Data\n\n## Quick Start\n\n### 1. Prepare Python Environment\n\nClone FTTA repository, create conda environment, and install required packages. This repository is constructed based on Tableshift repository. For any detail of TableShift, please visit TableShift at [tableshift.org](https://tableshift.org/index.html)\n\nNOTE: The requirements.txt file in FTTA is silently different from that in TableShift repo due to the package compatibility issues in Python.\n\n```shell\ngit clone https://github.com/WNJXYK/FTTA.git\ncd FTTA/src\nconda env create -f environment.yml\nconda activate ftta\npython examples/run_expt.py\n```\n\nThe final line above will print some detailed logging output as the script executes. When you see `training completed! test accuracy: 0.6221` your environment is ready to go! (Accuracy may vary slightly due to randomness.)\n\n### 2. Run FTTA Approach\n\nRun the FTTA approach using the command below:\n\n```shell\nconda activate ftta\npython model_train.py --experiment {exp_name} --model {model_name}\n```\n\nFor example, run the command below, soon it will show the result of FTTA methods and Unadapt methods.\n\n```shell\nconda activate ftta\npython model_train.py --experiment diabetes_readmission --model mlp\n```\n\nFor the first time running, dataset will be automatically download to `tmp` folder. For better reproduction our results, we provide pre-trained models for supported experiment and models, each experiment setting provides one model in  `scr/models` folder. Supported experiment and model are showed follows, we will expand the support list in the future.\n\nSupported models and experiments in FTTA is\n\n| Dataset              | String Identifier      |\n| -------------------- | ---------------------- |\n| Voting               | `anes`                 |\n| ASSISTments          | `assistments`          |\n| HELOC                | `heloc`                |\n| Hospital Readmission | `diabetes_readmission` |\n\n| Models         | String Identifier |\n| -------------- | ----------------- |\n| MLP            | `mlp`             |\n| TabTransformer | `tabtransformer`  |\n| FT-Transformer | `ft_transformer`  |\n\n### 3. Explore more on FTTA methods\n\nIf you want to explore FTTA on more datasets, some key files may be helpful to you. \n\n##### Some key code files\n\n| Path                                    | Function                                                     |\n| --------------------------------------- | ------------------------------------------------------------ |\n| `/tableshift/FTTA_src/FTTA.py`          | Definition of FTTA methods. When creating a FTTA class, a well trained tabular model, prior of training set and a optimizer type is need specifying. |\n| `/tableshift/models/torchutils.py`      | The evaluation process is defined here. Tf you want to test some other methods, modify evaluate function is needed. |\n| `/tableshift/models/default_hparams.py` | Algorithms' default hyper-parameters is defined here. We set 'n_epoch = 0' for test-time adaptation using trained model or provided model. If you want to train your own model, set 'n_epoch' to a positive integer. |\n\n### 4. Dataset Availability\n\nThe availability of dataset is the same as TableShift benchmark. If you want to add more dataset, see the guidelines of TableShift benchmark at [tableshift.org](https://tableshift.org/index.html).\n\n### 5. Q\u0026A\n\nIf you have any questions, feel free to contact us at [yuky@lamda.nju.edu.cn](mailto:yuky@lamda.nju.edu.cn) or submit an issue here.\n\n## Acknowledgements\n\nWe thank the author of TableShift benchmark providing a convenient framework to develop tabular algorithms.\n\n## Citation\n\nPlease cite the paper if you refer to our code or paper from FTTA.\n\n```\n@inproceedings{zhou24ftta,\n    author       = {Zhi Zhou and Kun-Yang Yu and Lan-Zhe Guo and Yu-Feng Li},\n    title        = {Fully Test-time Adaptation for Tabular Data},\n    booktitle    = {Proceedings of the 39th AAAI conference on Artificial Intelligence},\n    year         = {2025}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwnjxyk%2Fftta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwnjxyk%2Fftta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwnjxyk%2Fftta/lists"}