{"id":51456618,"url":"https://github.com/ielbadisy/tfmr","last_synced_at":"2026-07-06T01:01:29.792Z","repository":{"id":365057130,"uuid":"1264946973","full_name":"ielbadisy/tfmr","owner":"ielbadisy","description":"R package for tabular foundation models: TabPFN, TabICL, and TabFM.","archived":false,"fork":false,"pushed_at":"2026-07-03T09:08:25.000Z","size":1672,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-03T10:29:28.215Z","etag":null,"topics":["machine-learning","r","reticulate","tabfm","tabicl","tabpfn","tabular-data"],"latest_commit_sha":null,"homepage":"https://ielbadisy.github.io/tfmr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ielbadisy.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-10T10:19:31.000Z","updated_at":"2026-07-03T09:05:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ielbadisy/tfmr","commit_stats":null,"previous_names":["ielbadisy/tabfmr","ielbadisy/tfmr"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ielbadisy/tfmr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ielbadisy%2Ftfmr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ielbadisy%2Ftfmr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ielbadisy%2Ftfmr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ielbadisy%2Ftfmr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ielbadisy","download_url":"https://codeload.github.com/ielbadisy/tfmr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ielbadisy%2Ftfmr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35174071,"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":["machine-learning","r","reticulate","tabfm","tabicl","tabpfn","tabular-data"],"created_at":"2026-07-06T01:01:28.310Z","updated_at":"2026-07-06T01:01:29.731Z","avatar_url":"https://github.com/ielbadisy.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# tfmr\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/tfmr)](https://CRAN.R-project.org/package=tfmr)\n[![R-CMD-check](https://github.com/ielbadisy/tfmr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ielbadisy/tfmr/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/ielbadisy/tfmr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ielbadisy/tfmr?branch=main)\n\u003c!-- badges: end --\u003e\n\ntfmr is an R package for tabular foundation models. It provides a consistent S3 API for:\n\n- `tab_pfn()`\n- `tab_icl()`\n- `tab_fm()`\n\nThese models cover classification and regression on tabular data with mixed column types. See:\n\n- [_Transformers Can Do Bayesian Inference_](https://arxiv.org/abs/2112.10510) (arXiv, 2021)\n- [_TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second_](https://arxiv.org/abs/2207.01848) (arXiv, 2022)\n- [_Accurate predictions on small data with a tabular foundation model_](https://scholar.google.com/scholar?hl=en\u0026as_sdt=0%2C7\u0026q=%22Accurate+predictions+on+small+data+with+a+tabular+foundation+model%22) (Nature, 2025)\n\nThe R interface is implemented through `reticulate` and follows standard S3 methods.\n\n## Installation\n\nYou can download the package from CRAN via:\n\n```{r}\n#| eval: false\ninstall.packages(\"tfmr\")\n```\n\nor you can install the development version of tfmr like so:\n\n```{r}\n#| eval: false\nrequire(pak)\npak(c(\"ielbadisy/tfmr\"), ask = FALSE)\n```\n\nYou’ll need a Python virtual environment to access the underlying Python libraries. After installing the R package, tfmr will install the required Python bits when you first fit a model:\n\n```\n\u003e library(tfmr)\n\u003e\n\u003e predictors \u003c- mtcars[, -1]\n\u003e outcome \u003c- mtcars[, 1]\n\u003e\n\u003e # TabPFN example\n\u003e mod \u003c- tab_pfn(predictors, outcome)\nDownloading uv...Done!\nDownloading cpython-3.12.12 (download) (15.9MiB)\n Downloading cpython-3.12.12 (download)\nDownloading setuptools (1.1MiB)\nDownloading scikit-learn (8.2MiB)\nDownloading numpy (4.9MiB)\n\n\u003cdownloading and installing more packages\u003e\n\n Downloading llvmlite\n Downloading torch\nInstalled 58 packages in 350ms\n\u003e mod\nTabPFN Regression Model\n\nTraining set\ni 32 data points\ni 10 predictors\n```\n\n## Examples\n\nAfter loading the package:\n\n```{r}\n#| label: tab-start-up\nlibrary(tfmr)\n```\n\n### TabPFN\n\nFit a regression model via the standard x/y interface.\n\n```{r}\n#| label: mtcars\nset.seed(364)\nreg_mod \u003c- tab_pfn(mtcars[1:25, -1], mtcars$mpg[1:25])\nreg_mod\n```\n\nThere are also formula and recipes interfaces.\n\nPrediction follows the usual S3 `predict()` method:\n\n```{r}\n#| label: mtcars-pred\npredict(reg_mod, mtcars[26:32, -1])\n```\n\n`tfmr` uses a consistent prediction convention: a data frame is always returned with standard column names.\n\nFor a classification model, the outcome should always be a factor vector. For example, using these data from the `modeldata` package:\n\n```{r}\n#| label: cls\n#| results: none\nlibrary(modeldata)\n\ntwo_cls_train \u003c- parabolic[1:400,  ]\ngrid \u003c- expand.grid(X1 = seq(-5.1, 5.0, length.out = 25), \n                    X2 = seq(-5.5, 4.0, length.out = 25))\n\nset.seed(3824)\ncls_mod \u003c- tab_pfn(class ~ ., data = two_cls_train)\n\npredict(cls_mod, grid)\n```\n\n### Model Summary\n\n| Model | Function | Backend |\n| --- | --- | --- |\n| TabPFN | `tab_pfn()` | PriorLabs Python package |\n| TabICL | `tab_icl()` | `tabicl` Python package |\n| TabFM | `tab_fm()` | Google Research `tabfm` Python package |\n\n### TabICL\n\n`tab_icl()` uses the `tabicl` Python backend.\n\n```{r}\n#| eval: false\nicl_mod \u003c- tab_icl(mpg ~ wt + hp, data = mtcars)\npredict(icl_mod, mtcars[1:3, -1])\n```\n\n### TabFM\n\n`tab_fm()` uses the Google Research TabFM backend.\n\n```{r}\n#| eval: false\nfm_mod \u003c- tab_fm(mpg ~ wt + hp, data = mtcars)\npredict(fm_mod, mtcars[1:3, -1])\n```\n\n## License\n\n[PriorLabs](https://priorlabs.ai/) created the TabPFN model. Starting with version 2.5, using TabPFN requires accepting the model license and setting a token. Each model version (v2.5, v2.6, etc.) has its own license that must be accepted individually.\n\nTo get access, visit [https://ux.priorlabs.ai](https://ux.priorlabs.ai), go to the **Licenses** tab, and accept the license for each model version you intend to use. Then set the `TABPFN_TOKEN` environment variable with the token from your account. Users who already have `TABPFN_TOKEN` set can use TabPFN v2 without any additional steps.\n\nAlso, the model is most effective when a GPU is available. This is a practical constraint for some workloads but is less relevant for the R interface itself.\n\n## Code of Conduct\n  \nPlease note that the tfmr project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fielbadisy%2Ftfmr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fielbadisy%2Ftfmr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fielbadisy%2Ftfmr/lists"}