{"id":51448447,"url":"https://github.com/ersilia-os/chempfn","last_synced_at":"2026-07-05T18:30:51.539Z","repository":{"id":91107237,"uuid":"588467272","full_name":"ersilia-os/chempfn","owner":"ersilia-os","description":"Ensemble-based, size-agnostic wrapper for the TabPFN classifier","archived":false,"fork":false,"pushed_at":"2024-05-18T12:27:02.000Z","size":42972,"stargazers_count":33,"open_issues_count":14,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-27T21:12:25.999Z","etag":null,"topics":["classification","ensemble","machine-learning","tabpfn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ersilia-os.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-13T07:31:57.000Z","updated_at":"2025-07-22T17:01:14.000Z","dependencies_parsed_at":"2024-04-25T21:29:23.732Z","dependency_job_id":"2ad3debc-f168-4fc7-9f16-368692ce2421","html_url":"https://github.com/ersilia-os/chempfn","commit_stats":{"total_commits":52,"total_committers":3,"mean_commits":"17.333333333333332","dds":0.25,"last_synced_commit":"5553705c1f4f9feb37eb147bee6f5a98f7f3dc8b"},"previous_names":["ersilia-os/chempfn","ersilia-os/ensemble-tabpfn"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ersilia-os/chempfn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ersilia-os%2Fchempfn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ersilia-os%2Fchempfn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ersilia-os%2Fchempfn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ersilia-os%2Fchempfn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ersilia-os","download_url":"https://codeload.github.com/ersilia-os/chempfn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ersilia-os%2Fchempfn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35165553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"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":["classification","ensemble","machine-learning","tabpfn"],"created_at":"2026-07-05T18:30:51.405Z","updated_at":"2026-07-05T18:30:51.533Z","avatar_url":"https://github.com/ersilia-os.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChemPFN\n\n**TabPFN** is a transformer architecture proposed by [Hollman et al.](https://arxiv.org/abs/2207.01848) for classification on small tabular datasets. It is a Prior-Data Fitted Network (PFN) that has been trained once and does not require fine tuning for new datasets.\n\nTabPFN works by approximating the distribution of new data to the prior synthetic data it has seen during training. In a machine learning pipeline, this network can be \"fit\" on a training dataset in under a second and can generate predictions for the test set in a single forward pass in the network.\n\nWith **ChemPFN**, we address some of the limitations of the original TabPFN model and extend it to work with Chemical datasets using [Ersilia Compound Embeddings](https://pypi.org/project/eosce/). Using data and feature subsampling strategies, ChemPFN bypasses the limitation of 1000 rows and 100 features inherent in TabPFN. It is fully compatible with the [Scikit-learn API](https://scikit-learn.org/stable/index.html) and can be used in a modeling pipeline like any Scikit-learn estimator.\n\nChemPFN, when fit, creates ensembles of data points and input dimenions, if required. During the predict stage, it creates an ensemble of TabPFN models fit on the training set to generate predictions for the test set. These intermediate ensemble results are then aggregated to produce the final prediction. With this approach, the model is able to fit in under a second, however predictions can be slow based on configuration ([see below](https://github.com/ersilia-os/ensemble-tabpfn/blob/main/README.md#usage)), or the underlying hardware.\n\nThis model can be used directly with SMILES data without the need for prior featurization. Additionally, we provided a utility to explore this model on Antimicrobials dataset from ChEMBL.\n\n\n## Installation\n\n```bash\n\ngit clone https://github.com/ersilia-os/chempfn.git\ncd chempfn\npip install .\n```\n\n## Usage\n\nBy default, ChemPFN generates 100 data samples of size 1000 each to work with TabPFN. This can be configured to a lower number (for example, `max_iters=10`) to speeed up prediction. \n\n```python\n\nfrom chempfn import ChemPFN\nfrom sklearn.metrics import accuracy_score\n\nclf = ChemPFN(max_iters=100)\nclf.fit(X_train, y_train)\ny_hat = clf.predict(y_test)\nacc = accuracy_score(y_test, y_hat)\n```\n\n### Explore Antimicrobial Datasets\n\nWe provide a utility class to retrieve pre processed antimicrobial datasets. We list below the pathogens that are currently supported. For each pathogen, we allow the user to select a confidence level (hc or lc) for obtaining the assay activity.\n\n- Acinetobacter baumannii\n- Campylobacter spp.\n- Enterococcus faecium\n- Enterobacter spp.\n- Escherichia coli\n- Helicobacter pylori\n- Klebsiella pneumoniae\n- Mycobacterium tuberculosis\n- Neisseria gonorrhoeae\n- Plasmodium spp.\n- Pseudomonas aeruginosa\n- Schistosoma mansoni\n- Staphylococcus aureus\n- Streptococcus pneumoniae\n\n```python\n# Import the dataset loader\nfrom chempfn.utils import AntiMicrobialsDatasetLoader\n\ndataset_loader = AntiMicrobialsDatasetLoader()\ndf = dataset_loader.load('ecoli', 'hc')\n```\n\n## Citation\n\nIf you use this package, please cite the [original authors](https://arxiv.org/abs/2207.01848) of the model and [this package](https://github.com/ersilia-os/chempfn/blob/master/CITATION.cff).\n\n## License\n\nThis package is licensed under a GPL-3.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fersilia-os%2Fchempfn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fersilia-os%2Fchempfn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fersilia-os%2Fchempfn/lists"}