{"id":41242488,"url":"https://github.com/tidymodels/tabpfn","last_synced_at":"2026-01-23T01:20:44.967Z","repository":{"id":275332673,"uuid":"923110853","full_name":"tidymodels/tabpfn","owner":"tidymodels","description":"Foundation Model for Tabular Data via reticulate","archived":false,"fork":false,"pushed_at":"2025-12-04T14:34:18.000Z","size":1787,"stargazers_count":19,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-14T21:39:20.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://tabpfn.tidymodels.org/","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/tidymodels.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2025-01-27T16:59:44.000Z","updated_at":"2025-12-04T14:29:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"674bea32-aa27-417d-9bd7-ab4ed7b783d5","html_url":"https://github.com/tidymodels/tabpfn","commit_stats":null,"previous_names":["topepo/tabpfn","tidymodels/tabpfn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tidymodels/tabpfn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Ftabpfn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Ftabpfn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Ftabpfn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Ftabpfn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidymodels","download_url":"https://codeload.github.com/tidymodels/tabpfn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidymodels%2Ftabpfn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-23T01:20:44.864Z","updated_at":"2026-01-23T01:20:44.944Z","avatar_url":"https://github.com/tidymodels.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# tabpfn\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/tabpfn)](https://CRAN.R-project.org/package=tabpfn)\n[![R-CMD-check](https://github.com/tidymodels/tabpfn/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidymodels/tabpfn/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/tidymodels/tabpfn/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/tabpfn?branch=main)\n\u003c!-- badges: end --\u003e\n\ntabpfn, meaning prior fitted networks for tabular data, is a deep-learning model. 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\nThis R package is a wrapper of the [Python library](https://github.com/PriorLabs/tabpfn) via reticulate. It has an idiomatic R syntax using standard S3 methods. \n\n## Installation\n\nYou can install the development version of tabpfn like so:\n\n```{r}\n#| eval: false\nrequire(pak)\npak(c(\"tidymodels/tabpfn\"), ask = FALSE)\n```\n\nYou'll need a Python virtual environment to access the underlying library. After installing the R package, tabpfn will install the required Python bits when you first fit a model: \n\n```\n\u003e library(tabpfn)\n\u003e\n\u003e predictors \u003c- mtcars[, -1]\n\u003e outcome \u003c- mtcars[, 1]\n\u003e\n\u003e # XY interface\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\n## Example\n\n\n```{r}\n#| label: tab-start-up\nlibrary(tabpfn)\n```\n\nTo fit a model: \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\nIn addition to the x/y interface shown above, there 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\ntabpfn follows the tidymodels prediction convention: a data frame is always returned with a standard set of 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)\nlibrary(ggplot2)\n\ntwo_cls_train \u003c- parabolic[1:400,  ]\ntwo_cls_val   \u003c- parabolic[401:500,]\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\ngrid_pred \u003c- predict(cls_mod, grid)\ngrid_pred\n```\n\nThe fit looks fairly good when shown with out-of-sample data: \n\n```{r}\n#| label: boundaries\n#| fig.width: 5\n#| fig.height: 4\n#| fig.align: \"center\"\n#| out.width: 50%\n\ncbind(grid, grid_pred) |\u003e\n ggplot(aes(X1, X2)) + \n geom_point(data = two_cls_val, aes(col = class, pch = class), \n            alpha = 3 / 4, cex = 3) +\n geom_contour(aes(z = .pred_Class1), breaks = 1/ 2, col = \"black\", linewidth = 1) +\n coord_equal(ratio = 1)\n```\n\n## Code of Conduct\n  \nPlease note that the tabpfn 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%2Ftidymodels%2Ftabpfn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidymodels%2Ftabpfn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidymodels%2Ftabpfn/lists"}