TabPFN classifier with a scikit-learn-compatible interface.Construct a TabPFN classifier.This constructs a classifier using the latest model and settings. If you would
like to use a previous model version, use create_default_for_version()
instead. You can also use model_path to specify a particular model.
The number of estimators in the TabPFN ensemble. We aggregate the predictions of n_estimators-many forward passes of TabPFN. Each forward pass has (slightly) different input data. Think of this as an ensemble of n_estimators-many “prompts” of the input data. With the default "auto", the count comes from the checkpoint (InferenceConfig.N_ESTIMATORS), which is itself "auto" unless the checkpoint names a count. "auto" means DEFAULT_N_ESTIMATORS, raised on wide datasets so every feature is seen by some estimator (i.e. when the data has more than max_features_per_estimator features per estimator), to the smallest value that lets every feature appear in at least one ensemble member, emitting a warning when it does so. That auto-scaled value is capped at MAX_AUTO_SCALED_N_ESTIMATORS; beyond that some features may never be sampled unless you raise n_estimators yourself. An explicit integer — yours or the checkpoint’s — is never overridden: if it is too small to cover every feature, a warning is emitted at fit time and the value is used as given. Your integer cannot be combined with an N_ESTIMATORS in inference_config, which is the other way of naming a count.
auto_scale_n_estimators
bool
True
Deprecated, removed in v9 — pass an explicit n_estimators instead. Only applies when n_estimators="auto", where False keeps the auto value at DEFAULT_N_ESTIMATORS rather than raising it for feature coverage, exactly what passing that count as n_estimators does. Passing False emits a FutureWarning at fit time.
categorical_features_indices
Sequence[int] | None
None
The indices of the columns that are suggested to be treated as categorical. If None, the model will infer the categorical columns. A column with pandas’ category dtype counts as listed here. A string column declared this way is read as categorical whatever its cardinality, never as text; for a numeric one, we might ignore the suggestion to better fit the data seen during pre-training.
!!! note The indices are 0-based and should represent the data passed to .fit(). If the data changes between the initializations of the model and the .fit(), consider setting the .categorical_features_indices attribute after the model was initialized and before .fit().
softmax_temperature
float | Literal[“auto”]
"auto"
The temperature for the softmax function. This is used to control the confidence of the model’s predictions. Lower values make the model’s predictions more confident. This is only applied when predicting during a post-processing step. Set softmax_temperature=1.0 for no effect. Be advised that .predict() does not currently sample, so this setting is only relevant for .predict_proba() and .predict_logits().
If "auto" (the default), the temperature is taken from the checkpoint (InferenceConfig.SOFTMAX_TEMPERATURE), which is 0.9 for every checkpoint released up to and including v8.5.0. Passing a float overrides the checkpoint for every model in the ensemble; it cannot be combined with a SOFTMAX_TEMPERATURE in inference_config, which is the other way of naming one.
balance_probabilities
bool
False
Whether to balance the probabilities based on the class distribution in the training data. This can help to improve predictive performance when the classes are highly imbalanced and the metric of interest is insensitive to class imbalance (e.g., balanced accuracy, balanced log loss, roc-auc macro ovo, etc.). This is only applied when predicting during a post-processing step.
average_before_softmax
bool
False
Only used if n_estimators > 1. Whether to average the predictions of the estimators before applying the softmax function. This can help to improve predictive performance when there are many classes or when calibrating the model’s confidence. This is only applied when predicting during a post-processing.
- If True, the predictions are averaged before applying the softmax function. Thus, we average the logits of TabPFN and then apply the softmax. - If False, the softmax function is applied to each set of logits. Then, we average the resulting probabilities of each forward pass.
The path to the TabPFN model file, i.e., the pre-trained weights. Can be a list of paths to load multiple models. If a list is provided, the models are applied across different estimators.
- If "auto", the model will be downloaded upon first use. This defaults to your system cache directory, but can be overwritten with the use of an environment variable TABPFN_MODEL_CACHE_DIR. - If a path or a string of a path, the model will be loaded from the user-specified location if available, otherwise it will be downloaded to this location. Details on available checkpoints are available in the repository README.
- If a ModelSpecs object or list of them, use the in-memory models without loading checkpoints. The same specs can be used with either estimator when the model supports both tasks. Models are used by reference, not copied.
The device(s) to use for inference. See the documentation of .to().
ignore_pretraining_limits
bool
False
Whether to ignore the pre-training limits of the model. The TabPFN models have been pre-trained on a specific range of input data. If the input data is outside of this range, the model may not perform well. You may ignore our limits to use the model on data outside the pre-training range.
- If True, the model will not raise an error if the input data is outside the pre-training range. Also suppresses error when using the model with a large dataset on CPU. - If False, you can use the model outside the pre-training range, but the model could perform worse.
!!! note
For version 2.5, the pre-training limits are:
- 50_000 samples/rows - 2_000 features/columns (Note that for more than 500 features we subsample 500 features per estimator. It is therefore important to use a sufficiently large number of n_estimators.) - 10 classes, this is not ignorable and will raise an error if the model is used with more classes.
inference_precision
_dtype | Literal[“autocast”, “auto”]
"auto"
The precision to use for inference. This can dramatically affect the speed and reproducibility of the inference. Higher precision can lead to better reproducibility but at the cost of speed. By default, we optimize for speed and use torch’s mixed-precision autocast. The options are:
- If torch.dtype, we force precision of the model and data to be the specified torch.dtype during inference. This can is particularly useful for reproducibility. Here, we do not use mixed-precision. - If "autocast", enable PyTorch’s mixed-precision autocast. Ensure that your device is compatible with mixed-precision. - If "auto", we determine whether to use autocast or not depending on the device type.
Determine how the TabPFN model is “fitted”. The mode determines how the data is preprocessed and cached for inference. This is unique to an in-context learning foundation model like TabPFN, as the “fitting” is technically the forward pass of the model. The options are:
- If "low_memory", the data is preprocessed on-demand during inference when calling .predict() or .predict_proba(). This is the most memory-efficient mode but can be slower for large datasets because the data is (repeatedly) preprocessed on-the-fly. Ideal with low GPU memory and/or a single call to .fit() and .predict(). - If "fit_preprocessors", the data is preprocessed and cached once during the .fit() call. During inference, the cached preprocessing (of the training data) is used instead of re-computing it. Ideal with low GPU memory and multiple calls to .predict() with the same training data. - If "fit_with_cache", the data is preprocessed and cached once during the .fit() call like in fit_preprocessors. Moreover, the transformer key-value cache is also initialized, allowing for much faster inference on the same data at a large cost of memory. Ideal with very high GPU memory and multiple calls to .predict() with the same training data. - If "batched", the already pre-processed data is iterated over in batches. This can only be done after the data has been preprocessed with the get_preprocessed_datasets function. This is primarily used only for inference with the InferenceEngineBatchedNoPreprocessing class in Fine-Tuning. The fit_from_preprocessed() function sets this attribute internally.
Enable GPU/CPU memory saving mode. This can both avoid out-of-memory errors and improve fit+predict speed by reducing memory pressure.
It saves memory by automatically batching certain model computations within TabPFN.
- If “auto”: memory saving mode is enabled/disabled automatically based on a heuristic - If True/False: memory saving mode is forced enabled/disabled.
If speed is important to your application, you may wish to manually tune this option by comparing the time taken for fit+predict with it set to False and True.
!!! warning This does not batch the original input data. We still recommend to batch the test set as necessary if you run out of memory.
enable_torch_compile
bool
False
Compile the regions supported by the model architecture. Compilation can speed up repeated inference but adds startup cost to the first prediction, or to fitting when building a key-value cache. Disabled by default. Architectures without compilation support ignore it. v3.5 compilation requires PyTorch 2.6 or newer.
keep_cache_on_device
bool
True
Only relevant when fit_mode="fit_with_cache". If True (default), the key-value cache is kept on the inference device (e.g. GPU). Uses more device memory but gives lower latency. If False, the cache is stored on CPU.
kv_cache_precision
Literal[“auto”, “int8”, “fp8”, “adaptive”] | None
None
Only relevant when fit_mode="fit_with_cache". Resolved against what the model architecture supports. None (default) picks the architecture default ("int8" when it can quantize, e.g. TabPFN-3, else "auto"); "int8" quantizes the key-value cache to save memory; "fp8" stores it as 8-bit floats instead (same size, float rounding semantics; not supported on MPS); "auto" keeps the computed dtype; "adaptive" stores the cache on the grid an attention backend already rounded the keys and values to (one that declares kv_grid_dtype and took the call), and as "int8" otherwise. Requesting a quantized precision on an architecture that cannot quantize warns and falls back to "auto".
random_state
int | np.random.RandomState | np.random.Generator | None
0
Controls the randomness of the model. Pass an int for reproducible results and see the scikit-learn glossary for more information. If None, the randomness is determined by the system when calling .fit().
!!! warning We depart from the usual scikit-learn behavior in that by default we provide a fixed seed of 0.
!!! note Even if a seed is passed, we cannot always guarantee reproducibility due to PyTorch’s non-deterministic operations and general numerical instability. To get the most reproducible results across hardware, we recommend using a higher precision as well (at the cost of a much higher inference time). Likewise, for scikit-learn, consider passing USE_SKLEARN_16_DECIMAL_PRECISION=True as kwarg.
n_jobs
int | None
None
Deprecated, use n_preprocessing_jobs instead. This parameter never had any effect.
n_preprocessing_jobs
int
1
The number of worker threads to use for the preprocessing.
If 1, the preprocessing runs in the calling thread. If >1 and n_estimators > 1, the estimators are preprocessed on that many threads, which speeds up the fit on large tables. Threads beyond n_estimators are unused.
For advanced users, additional advanced arguments that adjust the behavior of the model interface. See tabpfn.inference_config.InferenceConfig for details and options.
- If None, the default InferenceConfig is used. - If dict, the key-value pairs are used to update the default InferenceConfig. Raises an error if an unknown key is passed. - If InferenceConfig, the object replaces the checkpoint’s config as a whole, so any field not set on it takes a class default rather than the value the checkpoint declares. Deprecated.
differentiable_input
bool
False
If true, the preprocessing will be adapted to be end-to-end differentiable with PyTorch. This is useful for explainability and prompt-tuning, essential in the prompttuning code.
Metric by which predictions will be ultimately evaluated on test data. This can be used to improve this metric on validation data by calibrating the model’s probabilities and tuning the decision thresholds during the fit()/predict() calls. The tuning can be enabled by configuring the tuning_config argument, see below. For currently supported metrics, see tabpfn.classifier.ClassifierEvalMetrics.
Whether to show a progress bar during inference. Defaults to False.
Usage guidance
TabPFN-3 and later versions support up to 1,000,000 rows, subject to
feature count, checkpoint limits, and memory.
For large datasets or limited memory, use per-estimator subsampling,
e.g. inference_config={"SUBSAMPLE_SAMPLES": 50_000}.
Pass raw pandas DataFrames to fit and predict. Categorical
strings/categories and missing feature values are handled automatically;
no manual integer/one-hot encoding, imputation, scaling, or outlier
removal is needed.
The configurations of the loaded models to be used for inference.
The concrete type of these configs is defined by the architectures in use and should be inspected at runtime, but they will be subclasses of ArchitectureConfig.
Additional configuration of the interface for expert users.
devices_
tuple[torch.device, …]
The devices determined to be used.
The devices are determined based on the device argument to the constructor, and the devices available on the system. See the constructor documentation for details.
feature_names_in_
npt.NDArray[Any]
The feature names of the input data.
May not be set if the input data does not have feature names, such as with a numpy array.
n_features_in_
int
The number of features in the input data used during fit().
The transformer that expanded every text column before validation.
categorical_features_indices_
list[int] | None
Declared categorical column positions after date/text expansion, including columns declared through pandas category dtype. Expanded source columns are removed and their generated features appended, so these positions can differ from those in the original fit input.
tuned_classification_thresholds_
npt.NDArray[Any] | None
The tuned classification thresholds for each class or None if no tuning is specified.
The validated evaluation metric to optimize for during prediction.
softmax_temperature_
float
The softmax temperature used for prediction. This is the resolved softmax_temperature, i.e. the one the checkpoint declares when no temperature tuning is done.
Per-class weights that undo the prior shift of SAMPLE_SUBSAMPLING_METHOD="majority_downsample", applied to the averaged probabilities. None when that sampler is not in effect.
Construct a classifier that uses the given version of the model.In addition to selecting the model, this also configures certain settings to the
default values associated with this model version.Any kwargs will override the default settings.
Load the model if needed and return the active inference config.Loads the model checkpoint without requiring fit data so the config can be
inspected before calling fit(). Any inference_config override
passed to the constructor is considered.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prior Labs","colors":{"primary":"#101075","light":"#ffffff","dark":"#1e293b"},"logo":{"light":"https://mintcdn.com/priorlabs/t197PY0EpQCr-YHY/logo/light.svg?fit=max\u0026auto=format\u0026n=t197PY0EpQCr-YHY\u0026q=85\u0026s=33643e275cfc08c99769e1719c4f53c2","dark":"https://mintcdn.com/priorlabs/t197PY0EpQCr-YHY/logo/light.svg?fit=max\u0026auto=format\u0026n=t197PY0EpQCr-YHY\u0026q=85\u0026s=33643e275cfc08c99769e1719c4f53c2"},"favicon":"https://mintcdn.com/priorlabs/SdCir_vgKw3mGacd/favicon.png?fit=max\u0026auto=format\u0026n=SdCir_vgKw3mGacd\u0026q=85\u0026s=88fa647a00e90147d312725e3354c544","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://priorlabs.ai/contact?utm_source=docs","label":"Talk to Sales"}],"primary":{"type":"button","label":"Try TabPFN","href":"https://platform.priorlabs.ai/playground"}},"footer":{"socials":{"github":"https://github.com/priorlabs","linkedin":"https://www.linkedin.com/company/prior-labs"}},"fonts":{"heading":{"family":"Inter","weight":700},"body":{"family":"DM Sans","weight":400}},"integrations":{"ga4":{"measurementId":"G-9VZ68NQKPM"},"posthog":{"apiKey":"phc_GN5N25uDvJqsqnxmoM6Akr2CuyFIZsdu5ZokAXsPa1N","apiHost":"https://eu.i.posthog.com","sessionRecording":true}},"banner":{"content":"New course with Andrew Ng: **Tabular Foundation Models for Data Science Agents**. [Enroll now →](https://bit.ly/4sQZVAA)","dismissible":true},"interaction":{"drilldown":false},"markdown":{"instructions":["TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.","For large datasets, use per-estimator subsampling, e.g. inference_config={\"SUBSAMPLE_SAMPLES\": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.","Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed."]},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/priorlabs/tabpfn"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/VJRuU3bSxt"},{"anchor":"Colab Demo","icon":"book","href":"https://colab.research.google.com/github/PriorLabs/TabPFN/blob/main/examples/notebooks/TabPFN_Demo_Local.ipynb"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"priorlabs","hasAudioNarration":false,"actualSubdomain":"priorlabs","customDomains":["docs.priorlabs.ai"],"gitSource":{"type":"github","owner":"priorlabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afd9ad06e8299194cf5b6a7","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API reference","count":79},{"language":"default","tag":"Documentation","count":51},{"language":"default","tag":"Cookbook","count":27},{"language":"default","tag":"All Cookbooks","count":27},{"language":"default","tag":"tabpfn","count":25},{"language":"default","tag":"Capabilities","count":24},{"language":"default","tag":"tabpfn-extensions","count":23},{"language":"default","tag":"tabpfn-client","count":17},{"language":"default","tag":"TabPFNRegressor","count":10},{"language":"default","tag":"tabpfn-rel","count":8}]},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".cookbook-filter-bar{display:flex;flex-direction:column;align-items:flex-start;gap:0.75rem;margin:1.5rem 0 2rem}.cookbook-filter-label{font-size:0.875rem;font-weight:600;color:#334155}.cookbook-tag-filters{display:flex;flex-wrap:wrap;gap:0.5rem;align-items:center}.cookbook-tag-filter-btn,.cookbook-tag-filter-clear{display:inline-flex;align-items:center;padding:0.375rem 0.75rem;border-radius:9999px;border:1px solid #cbd5e1;background:#ffffff;color:#334155;font-size:0.8125rem;font-weight:600;line-height:1.25rem;cursor:pointer;transition:background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease}.cookbook-tag-filter-btn:hover,.cookbook-tag-filter-clear:hover{border-color:#101075;color:#101075}.cookbook-tag-filter-btn.is-active{background:#101075;border-color:#101075;color:#ffffff}.cookbook-tag-filter-clear{border-style:dashed}.cookbook-grid{display:grid;grid-template-columns:repeat(6, minmax(0, 1fr));gap:1rem}.cookbook-tile{height:100%;grid-column:span 2}.cookbook-tile>a,.cookbook-tile>div{height:100%}.cookbook-grid[data-featured-count=\"1\"] .cookbook-tile.is-featured{grid-column:span 6}.cookbook-grid[data-featured-count=\"2\"] .cookbook-tile.is-featured{grid-column:span 3}.cookbook-grid[data-featured-count=\"3\"] .cookbook-tile.is-featured{grid-column:span 2}@media (max-width: 1024px){.cookbook-grid{grid-template-columns:repeat(4, minmax(0, 1fr))}.cookbook-grid[data-featured-count=\"1\"] .cookbook-tile.is-featured{grid-column:span 4}.cookbook-grid[data-featured-count=\"2\"] .cookbook-tile.is-featured,.cookbook-grid[data-featured-count=\"3\"] .cookbook-tile.is-featured{grid-column:span 2}}@media (max-width: 640px){.cookbook-grid{grid-template-columns:minmax(0, 1fr)}.cookbook-tile,.cookbook-grid[data-featured-count] .cookbook-tile.is-featured{grid-column:1 / -1}}.cookbook-tile.is-featured>a,.cookbook-tile.is-featured>div{position:relative;border:2px solid #101075;box-shadow:0 8px 24px -12px rgba(16, 16, 117, 0.45);background-image:linear-gradient(\n 135deg,\n rgba(16, 16, 117, 0.06) 0%,\n rgba(16, 16, 117, 0) 55%\n )}.cookbook-tile.is-featured>a:hover{border-color:#101075;box-shadow:0 12px 32px -12px rgba(16, 16, 117, 0.6)}.cookbook-featured-badge{display:inline-flex;align-items:center;gap:0.25rem;margin:0 0 0.75rem;padding:0.125rem 0.625rem;border-radius:9999px;background:#101075;color:#ffffff;font-size:0.75rem;font-weight:700;letter-spacing:0.02em;line-height:1.25rem;text-transform:uppercase}.cookbook-tile.is-featured .cookbook-tile-description{font-size:1rem}.cookbook-tile-tags{display:flex;flex-wrap:wrap;gap:0.375rem;margin:0 0 0.75rem}.cookbook-tag-pill{display:inline-flex;align-items:center;padding:0.125rem 0.5rem;border-radius:9999px;background:#eef2ff;color:#101075;font-size:0.75rem;font-weight:600;line-height:1.25rem}.cookbook-tile-description{margin:0;color:#475569;font-size:0.9375rem;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;text-overflow:ellipsis}.cookbook-tile.is-featured .cookbook-tile-description{-webkit-line-clamp:2;line-clamp:2}.cookbook-meta{display:flex;flex-wrap:wrap;align-items:center;gap:0.75rem 1rem;margin:0 0 1.75rem}.cookbook-authors{margin:0;min-width:0}.cookbook-colab{display:flex;justify-content:flex-end;align-items:center;margin:0 0 0 auto}.cookbook-colab-button{display:inline-flex!important;align-items:center;gap:0.5rem;padding:0.5rem 1rem!important;font-family:Inter, ui-sans-serif, system-ui, sans-serif!important;font-size:0.875rem!important;font-weight:500!important;line-height:1.25!important;color:#101075!important;background-color:#ffffff!important;border:1px solid #101075!important;border-radius:0.75rem!important;text-decoration:none!important;box-shadow:none!important;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,\n transform 0.15s ease;cursor:pointer}.cookbook-colab-button:hover{background-color:#f3f3fa!important;border-color:#2a2a99!important;color:#2a2a99!important;transform:translateY(-1px)}.cookbook-colab-icon{width:1.125rem;height:1.125rem;flex-shrink:0;display:block}.cookbook-colab-label{white-space:nowrap}.cookbook-author-bar{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.625rem;padding:0.625rem 0.875rem;border:1px solid #e2e8f0;border-radius:9999px;background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);box-shadow:0 1px 2px rgba(15, 23, 42, 0.04)}.cookbook-author-by{font-size:0.8125rem;font-weight:500;color:#64748b!important;letter-spacing:0.01em;flex-shrink:0}.cookbook-author-list{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.5rem 0.75rem}.cookbook-author-entry{display:inline-flex;align-items:center;gap:0.5rem}.cookbook-author-separator{color:#cbd5e1!important;font-size:1rem;line-height:1;user-select:none}.cookbook-author-name{font-size:0.9375rem;font-weight:600;color:#101075!important;white-space:nowrap}.cookbook-author-links{display:inline-flex;align-items:center;gap:0.375rem}.cookbook-author-icon-link{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:9999px;color:#475569!important;background:#ffffff;border:1px solid #e2e8f0;text-decoration:none;transition:color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease}.cookbook-author-icon-link:hover{color:#101075!important;border-color:#c7d2fe;background:#eef2ff;transform:translateY(-1px)}.cookbook-author-icon{width:0.95rem;height:0.95rem;display:block}.compare-benchmark-table{overflow-x:auto;border:1px solid #dbe4f0;border-radius:0.75rem;background:#ffffff}.compare-task-switch-controls{display:inline-flex;gap:0.25rem;margin:0 0 1rem;padding:0.25rem;border:1px solid #dbe4f0;border-radius:0.5rem;background:#f8fafc}.compare-task-switch-button{padding:0.45rem 0.8rem;border:0;border-radius:0.35rem;background:transparent;color:#64748b;font-size:0.8125rem;font-weight:600;cursor:pointer}.compare-task-switch-button.is-active{background:#101075;color:#ffffff}.compare-task-panel[aria-hidden=\"true\"]{display:none}.compare-task-panel[aria-hidden=\"false\"]{display:block}.compare-benchmark-table table{display:table!important;width:100%!important;min-width:680px;margin:0;border-collapse:separate;border-spacing:0;table-layout:fixed!important}.compare-benchmark-table th:first-child,.compare-benchmark-table td:first-child{width:34%}.compare-benchmark-table th:not(:first-child),.compare-benchmark-table td:not(:first-child){width:13.2%}.compare-benchmark-table-performance table{min-width:0}.compare-benchmark-table-performance th:first-child,.compare-benchmark-table-performance td:first-child{width:50%}.compare-benchmark-table-performance th:not(:first-child),.compare-benchmark-table-performance td:not(:first-child){width:25%}.compare-benchmark-table-speed table{min-width:0}.compare-benchmark-table-speed th:first-child,.compare-benchmark-table-speed td:first-child{width:40%}.compare-benchmark-table-speed th:not(:first-child),.compare-benchmark-table-speed td:not(:first-child){width:20%}.compare-benchmark-table th,.compare-benchmark-table td{padding:0.75rem 1rem;border-bottom:1px solid #e8eef5;white-space:nowrap;text-align:right}.compare-benchmark-table th:first-child,.compare-benchmark-table td:first-child{text-align:left}.compare-benchmark-table th{color:#64748b;background:#f8fafc;font-size:0.75rem;font-weight:700}.compare-benchmark-table td{color:#475569;font-size:0.875rem}.benchmark-config-info{display:inline-block;position:relative;text-align:left;white-space:normal}.benchmark-config-trigger{padding:0;border:0;background:transparent;color:#12213a;cursor:pointer;text-decoration:underline dotted;text-underline-offset:0.2em}.benchmark-config-trigger:focus-visible{outline:2px solid #2855d9;outline-offset:2px}.benchmark-config-popover{position:fixed;z-index:1000;padding:0.75rem;border:1px solid #cbd5e1;border-radius:0.5rem;background:#ffffff;box-shadow:0 8px 24px rgb(15 23 42 / 18%);color:#334155;font-size:0.8125rem;line-height:1.5;text-align:left;white-space:normal}.benchmark-config-popover::before{position:absolute;top:-0.35rem;left:1rem;width:0.6rem;height:0.6rem;border-top:1px solid #cbd5e1;border-left:1px solid #cbd5e1;background:#ffffff;content:\"\";transform:rotate(45deg)}.benchmark-config-popover.is-above::before{top:auto;bottom:-0.35rem;border:0;border-right:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1}.compare-data-types-table .data-type-supported,.compare-data-types-table .data-type-engineering{font-weight:600}.compare-data-types-table .data-type-supported{color:#101075}.compare-data-types-table .data-type-processed{color:#2855d9}.compare-data-types-table .data-type-engineering{color:#a21caf}.compare-benchmark-table tr:last-child td{border-bottom:0}.compare-benchmark-table .compare-table-row-tabpfn td{background:#eef4ff}.compare-benchmark-table .compare-table-row-tabpfn td:first-child{border-left:3px solid #2855d9}.compare-benchmark-table .compare-table-row-xgboost td{background:#fff5e9}.compare-benchmark-table .compare-table-row-xgboost td:first-child{border-left:3px solid #c85c0a}.compare-benchmark-table .compare-table-best{color:#12213a;font-weight:800}.compare-benchmark-note{margin:1rem 0 2rem;color:#64748b;font-size:0.8125rem;line-height:1.55}.compare-choice-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:1rem;margin:1.5rem 0 2.5rem}.compare-choice{padding:1.25rem;border:1px solid #dbe4f0;border-radius:0.5rem;background:#f8fbff}.compare-choice-competitor{border-color:#eadfce;background:#fdfaf5}.compare-choice h3{margin:0 0 0.75rem;font-size:0.95rem}.compare-choice ul{margin:0;padding-left:1.1rem;color:#475569;font-size:0.875rem}.compare-choice li{margin:0.5rem 0}@media (max-width: 700px){.compare-choice-grid{grid-template-columns:minmax(0, 1fr)}}.sidebar-group-title{font-size:0.5rem!important;font-weight:600!important}[data-testid=\"sidebar-group-title\"]{font-size:0.5rem!important;font-weight:600!important}.sidebar .group-title{font-size:0.5rem!important;font-weight:600!important}.sidebar-group-title{margin-bottom:0.5rem!important;margin-top:1rem!important}.table-container{width:auto!important;overflow-x:auto!important}.table-container table{width:auto!important;table-layout:auto!important}.table-container table th:first-child,.table-container table td:first-child{text-align:left!important;white-space:nowrap!important;padding-right:1rem!important}.table-container table th:last-child,.table-container table td:last-child{text-align:left!important}.nav-logo{width:27%!important;height:auto}h1,h2,h3,h4,h5,h6{color:#101075!important}.heading-1,.heading-2,.heading-3,.heading-4,.heading-5,.heading-6{color:#101075!important}[data-heading]{color:#101075!important}.heading{color:#101075!important}.main-content,.content,.page-content{background-color:#f8f8f9!important}body,p,div,a,li,td,th{color:#0c0c0c!important}strong,b{font-weight:700!important;color:#0c0c0c!important}.paragraph{color:#0c0c0c!important}a{color:#0c0c0c!important}.sidebar-group-title{font-size:0.5rem!important;font-weight:600!important}[data-testid=\"sidebar-group-title\"]{font-size:0.5rem!important;font-weight:600!important}.sidebar .group-title{font-size:0.5rem!important;font-weight:600!important}.sidebar-group-title{margin-bottom:0.5rem!important;margin-top:1rem!important}.table-container-dc3e57e5{width:100%!important;overflow-x:auto!important}.table-container-dc3e57e5 table{width:100%!important;table-layout:fixed!important}.table-container-dc3e57e5 table th:first-child,.table-container-dc3e57e5 table td:first-child{width:50%!important;text-align:left!important;white-space:nowrap!important;padding-right:1rem!important}.table-container-dc3e57e5 table th:nth-child(2),.table-container-dc3e57e5 table td:nth-child(2){width:50%!important;text-align:left!important}.table-container-nowrap{width:100%!important;overflow-x:auto!important}.table-container-nowrap table{width:auto!important;table-layout:auto!important}.table-container-nowrap table th,.table-container-nowrap table td{white-space:nowrap!important;text-align:left!important;padding-right:1rem!important}.table-container-nowrap table th:first-child,.table-container-nowrap table td:first-child{width:auto!important;padding-right:1.5rem!important}.metering-operations th,.metering-operations td{padding:0.75rem 1rem}.metering-operations thead th{font-weight:700}#banner{background:linear-gradient(90deg, #101075 0%, #1e3a8a 60%, #2563eb 100%)!important;font-size:0.875rem;letter-spacing:0.01em}#banner,#banner *{color:#ffffff!important}#banner strong{font-weight:700}#banner a{color:#ffffff!important;font-weight:600;text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(255, 255, 255, 0.6);transition:text-decoration-color 0.15s ease}#banner a:hover{text-decoration-color:#ffffff}.dlai-course{display:grid;grid-template-columns:minmax(0, 1.1fr) minmax(0, 1fr);gap:1.5rem;margin:2rem 0;padding:1.5rem;background:#ffffff;border:2px solid #f65b66;border-radius:1rem}.dlai-course-media{position:relative}.dlai-course-video{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0.75rem}.dlai-course-logo{display:block;flex-shrink:0;height:1.875rem;width:auto;margin:0}.dlai-course-heading{display:flex;align-items:center;flex-wrap:wrap;gap:0 0.375rem}.dlai-course-eyebrow{margin:0;font-size:0.75rem;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;opacity:0.85}.dlai-course-title{margin:0.25rem 0 1rem;font-size:1.25rem;font-weight:700;line-height:1.3}.dlai-course-description{margin:0;font-size:0.9rem;line-height:1.6}.dlai-course-cta{display:inline-block;margin-top:1rem;padding:0.5rem 1rem;background:#f65b66;border-radius:0.75rem;color:#ffffff!important;font-size:0.875rem;font-weight:600;text-decoration:none!important;transition:background-color 0.15s ease}.dlai-course-cta:hover{background:#e0434f}@media (max-width: 768px){.dlai-course{grid-template-columns:1fr}.dlai-course-media{aspect-ratio:16 / 9}}#navbar a[href=\"https://priorlabs.ai/contact?utm_source=docs\"]{display:inline-flex!important;align-items:center;gap:0.625rem;padding:0.5rem 1rem!important;font-size:0.875rem!important;font-weight:500!important;color:#101075!important;background-color:#ffffff!important;border:1px solid #101075!important;border-radius:0.75rem!important;text-decoration:none!important;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;cursor:pointer}#navbar a[href=\"https://priorlabs.ai/contact?utm_source=docs\"]::after{content:\"\";display:inline-block;width:6px;height:6px;border-right:1.5px solid #101075;border-bottom:1.5px solid #101075;transform:rotate(-45deg);margin-top:-1px;flex-shrink:0;transition:border-color 0.2s ease}#navbar a[href=\"https://priorlabs.ai/contact?utm_source=docs\"]:hover{background-color:#f3f3fa!important;border-color:#2a2a99!important;color:#2a2a99!important}#navbar a[href=\"https://priorlabs.ai/contact?utm_source=docs\"]:hover::after{border-right-color:#2a2a99;border-bottom-color:#2a2a99}.research-search-bar{display:flex;flex-direction:column;gap:0.5rem;margin:1.5rem 0 1rem}.research-search-label{font-size:0.875rem;font-weight:600;color:#334155}.research-search-input-wrap{position:relative;display:flex;align-items:center;width:100%;max-width:32rem}.research-search-icon{position:absolute;left:0.75rem;width:1.125rem;height:1.125rem;color:#94a3b8;pointer-events:none}.research-search-input{width:100%;padding:0.625rem 0.75rem 0.625rem 2.375rem;border:1px solid #cbd5e1;border-radius:0.75rem;background:#ffffff;color:#0f172a;font-size:0.9375rem;line-height:1.375rem;transition:border-color 0.15s ease, box-shadow 0.15s ease}.research-search-input::placeholder{color:#94a3b8}.research-search-input:focus{outline:none;border-color:#101075;box-shadow:0 0 0 3px rgba(16, 16, 117, 0.12)}.research-filter-bar{display:flex;flex-direction:column;align-items:flex-start;gap:0.75rem;margin:1.5rem 0 1rem}.research-filter-label{font-size:0.875rem;font-weight:600;color:#334155}.research-tag-filters{display:flex;flex-wrap:wrap;gap:0.5rem;align-items:center}.research-tag-filter-btn,.research-tag-filter-clear{display:inline-flex;align-items:center;padding:0.375rem 0.75rem;border-radius:9999px;border:1px solid #cbd5e1;background:#ffffff;color:#334155;font-size:0.8125rem;font-weight:600;line-height:1.25rem;cursor:pointer;transition:background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease}.research-tag-filter-btn:hover,.research-tag-filter-clear:hover{border-color:#101075;color:#101075}.research-tag-filter-btn.is-active{background:#101075;border-color:#101075;color:#ffffff}.research-tag-filter-clear{border-style:dashed}.research-count{font-size:0.8125rem;font-weight:500;color:#64748b;margin:0 0 1rem}.research-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:1rem}@media (max-width: 900px){.research-grid{grid-template-columns:minmax(0, 1fr)}}.research-tile{display:flex!important;flex-direction:column;gap:0.75rem;padding:1.25rem 1.25rem 1rem;border:1px solid #e2e8f0;border-radius:0.75rem;background:#ffffff;color:inherit!important;text-decoration:none!important;transition:border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;height:100%}.research-tile.is-hidden{display:none!important}.research-tile:hover{border-color:#101075;box-shadow:0 6px 20px rgba(16, 16, 117, 0.08);transform:translateY(-1px)}.research-tile-cta{background:linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);border-color:#c7d2fe;border-style:dashed}.research-tile-cta:hover{border-style:solid}.research-tile-cta .research-tile-meta{color:#101075;font-weight:600;text-transform:none;letter-spacing:0;font-size:0.8125rem}.research-tile-header{display:flex;flex-wrap:wrap;gap:0.375rem}.research-tag-pill{display:inline-flex;align-items:center;padding:0.125rem 0.5rem;border-radius:9999px;background:#eef2ff;color:#101075;font-size:0.75rem;font-weight:600;line-height:1.25rem}.research-tile-title{margin:0;font-size:1rem;font-weight:600;line-height:1.35;color:#0f172a!important}.research-tile-description{margin:0;color:#475569;font-size:0.9375rem;line-height:1.55;flex-grow:1}.research-tile-footer{display:flex;flex-direction:column;gap:0.25rem;margin-top:0.25rem;padding-top:0.75rem;border-top:1px solid #f1f5f9;font-size:0.8125rem;color:#64748b}.research-tile-authors{font-weight:500;color:#334155}.research-tile-meta{color:#94a3b8;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.03em}.research-pagination{display:none;align-items:center;justify-content:center;gap:1rem;margin:1.5rem 0 0;width:100%;clear:both;grid-column:1 / -1}.research-pagination.is-visible{display:flex}.research-pagination-btn{display:inline-flex;align-items:center;justify-content:center;min-width:6rem;padding:0.5rem 0.875rem;border:1px solid #cbd5e1;border-radius:0.75rem;background:#ffffff;color:#334155;font-size:0.875rem;font-weight:600;line-height:1.25rem;cursor:pointer;transition:background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease}.research-pagination-btn:hover:not(:disabled){border-color:#101075;color:#101075}.research-pagination-btn:disabled{cursor:not-allowed;opacity:0.45}.research-pagination-status{font-size:0.875rem;font-weight:600;color:#475569}.python-reference-table table{width:100%!important;min-width:640px;table-layout:fixed!important}.python-reference-table th,.python-reference-table td{white-space:normal!important;overflow-wrap:anywhere;vertical-align:top}.python-reference-table th:nth-child(1){width:20%}.python-reference-table th:nth-child(2){width:20%}.python-reference-table th:nth-child(3){width:16%}.python-reference-table th:nth-child(4){width:44%}.python-reference-table code{white-space:normal;overflow-wrap:anywhere}.python-reference-table code.python-reference-parameter{overflow-wrap:normal;word-break:normal}.python-reference-table [id]{scroll-margin-top:180px}.python-reference-returns table{min-width:0}.python-reference-returns th:nth-child(1){width:32%}.python-reference-returns th:nth-child(2){width:68%}body:has(.python-reference-table) #pagination{gap:1rem}body:has(.python-reference-table) #pagination>a{min-width:0;max-width:48%}body:has(.python-reference-table) #pagination>a span{overflow-wrap:anywhere}body:has(.python-reference-table) #pagination>a svg{flex-shrink:0}.python-reference-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:0.75rem 1rem;margin:2.5rem 0 1rem}.python-reference-heading h2{margin:0!important;min-width:0}.python-reference-heading h2 code{font-size:0.85em;white-space:normal;overflow-wrap:anywhere}.python-reference-source{display:inline-flex;align-items:center;gap:0.375rem;flex-shrink:0;padding:0.25rem 0.5rem;border:1px solid color-mix(in srgb, currentColor 20%, transparent);border-radius:0.375rem;color:inherit!important;font-size:0.75rem;line-height:1.25rem;text-decoration:none!important}.python-reference-source:hover{background:color-mix(in srgb, currentColor 6%, transparent)}.python-reference-type a{font:inherit;padding:0;border-radius:0;background:transparent}"}]}
{"page":{"pagePath":"api-reference/python/tabpfn/classifier/configuration","slug":"/api-reference/python/tabpfn/classifier/configuration","pageMetadata":{"title":"Constructor and configuration","description":"TabPFN classifier with a scikit-learn-compatible interface.","href":"/api-reference/python/tabpfn/classifier/configuration"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"TabPFN classifier with a scikit-learn-compatible interface.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Heading,Info,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Info,{children:_jsxs(_components.p,{children:[`Looking for usage documentation? Check out `,_jsx(_components.a,{href:`/capabilities/classification`,children:`Classification`}),`.`]})}),`\n`,_jsxs(`div`,{className:`python-reference-heading`,children:[_jsx(Heading,{level:`2`,id:`constructor`,children:_jsx(_components.code,{children:`TabPFNClassifier`})}),_jsxs(`a`,{className:`python-reference-source`,href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L141`,\"aria-label\":`View source for TabPFNClassifier`,children:[_jsx(`span`,{\"aria-hidden\":`true`,children:`\u003c/>`}),` View source `,_jsx(`span`,{\"aria-hidden\":`true`,children:`↗`})]})]}),`\n`,_jsx(_components.p,{children:`TabPFN classifier with a scikit-learn-compatible interface.`}),`\n`,_jsx(_components.p,{children:`Construct a TabPFN classifier.`}),`\n`,_jsxs(_components.p,{children:[`This constructs a classifier using the latest model and settings. If you would\nlike to use a previous model version, use `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/configuration#create-default-for-version`,children:_jsx(_components.code,{children:`create_default_for_version()`})}),`\ninstead. You can also use `,_jsx(_components.code,{children:`model_path`}),` to specify a particular model.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`TabPFNClassifier(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` n_estimators: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` auto_scale_n_estimators: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` categorical_features_indices: Sequence[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` softmax_temperature: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`float`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` balance_probabilities: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` average_before_softmax: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` model_path: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Path `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` list[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` list[Path] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ModelSpecs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` list[ModelSpecs] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` device: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`DevicesSpecification`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ignore_pretraining_limits: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` inference_precision: _dtype `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"autocast\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fit_mode: Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"low_memory\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fit_preprocessors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fit_with_cache\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"batched\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fit_preprocessors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` memory_saving_mode: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`MemorySavingMode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` enable_torch_compile: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` keep_cache_on_device: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` kv_cache_precision: Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"int8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fp8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"adaptive\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` random_state: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` np.random.RandomState `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` np.random.Generator `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` n_jobs: Annotated[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, deprecated(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Use n_preprocessing_jobs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` n_preprocessing_jobs: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`int`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` inference_config: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`dict`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` InferenceConfig `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` differentiable_input: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` eval_metric: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ClassifierEvalMetrics `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tuning_config: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`dict`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ClassifierTuningConfig `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` show_progress_bar: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Accordion,{title:`Type aliases`,id:`type-aliases`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`DevicesSpecification `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` torch.device `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sequence[torch.device `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`MemorySavingMode `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` bool`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Literal[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` float`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` int`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(`div`,{className:`python-reference-table`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--n-estimators`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`n_`,_jsx(`wbr`,{}),`estimators`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`int | Literal[“auto”]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"auto\"`})}),_jsxs(_components.td,{children:[`The number of estimators in the TabPFN ensemble. We aggregate the predictions of `,_jsx(_components.code,{children:`n_estimators`}),`-many forward passes of TabPFN. Each forward pass has (slightly) different input data. Think of this as an ensemble of `,_jsx(_components.code,{children:`n_estimators`}),`-many “prompts” of the input data. With the default `,_jsx(_components.code,{children:`\"auto\"`}),`, the count comes from the checkpoint (`,_jsx(_components.code,{children:`InferenceConfig.N_ESTIMATORS`}),`), which is itself `,_jsx(_components.code,{children:`\"auto\"`}),` unless the checkpoint names a count. `,_jsx(_components.code,{children:`\"auto\"`}),` means `,_jsx(_components.code,{children:`DEFAULT_N_ESTIMATORS`}),`, raised on wide datasets so every feature is seen by some estimator (i.e. when the data has more than `,_jsx(_components.code,{children:`max_features_per_estimator`}),` features per estimator), to the smallest value that lets every feature appear in at least one ensemble member, emitting a warning when it does so. That auto-scaled value is capped at `,_jsx(_components.code,{children:`MAX_AUTO_SCALED_N_ESTIMATORS`}),`; beyond that some features may never be sampled unless you raise `,_jsx(_components.code,{children:`n_estimators`}),` yourself. An explicit integer — yours or the checkpoint’s — is never overridden: if it is too small to cover every feature, a warning is emitted at fit time and the value is used as given. Your integer cannot be combined with an `,_jsx(_components.code,{children:`N_ESTIMATORS`}),` in `,_jsx(_components.code,{children:`inference_config`}),`, which is the other way of naming a count.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--auto-scale-n-estimators`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`auto_`,_jsx(`wbr`,{}),`scale_`,_jsx(`wbr`,{}),`n_`,_jsx(`wbr`,{}),`estimators`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`True`})}),_jsxs(_components.td,{children:[`Deprecated, removed in v9 — pass an explicit `,_jsx(_components.code,{children:`n_estimators`}),` instead. Only applies when `,_jsx(_components.code,{children:`n_estimators=\"auto\"`}),`, where `,_jsx(_components.code,{children:`False`}),` keeps the auto value at `,_jsx(_components.code,{children:`DEFAULT_N_ESTIMATORS`}),` rather than raising it for feature coverage, exactly what passing that count as `,_jsx(_components.code,{children:`n_estimators`}),` does. Passing `,_jsx(_components.code,{children:`False`}),` emits a `,_jsx(_components.code,{children:`FutureWarning`}),` at fit time.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--categorical-features-indices`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`categorical_`,_jsx(`wbr`,{}),`features_`,_jsx(`wbr`,{}),`indices`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`Sequence[int] | None`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsxs(_components.td,{children:[`The indices of the columns that are suggested to be treated as categorical. If `,_jsx(_components.code,{children:`None`}),`, the model will infer the categorical columns. A column with pandas’ `,_jsx(_components.code,{children:`category`}),` dtype counts as listed here. A string column declared this way is read as categorical whatever its cardinality, never as text; for a numeric one, we might ignore the suggestion to better fit the data seen during pre-training.`,_jsx(`br`,{}),_jsx(`br`,{}),`!!! note The indices are 0-based and should represent the data passed to `,_jsx(_components.code,{children:`.fit()`}),`. If the data changes between the initializations of the model and the `,_jsx(_components.code,{children:`.fit()`}),`, consider setting the `,_jsx(_components.code,{children:`.categorical_features_indices`}),` attribute after the model was initialized and before `,_jsx(_components.code,{children:`.fit()`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--softmax-temperature`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`softmax_`,_jsx(`wbr`,{}),`temperature`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`float | Literal[“auto”]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"auto\"`})}),_jsxs(_components.td,{children:[`The temperature for the softmax function. This is used to control the confidence of the model’s predictions. Lower values make the model’s predictions more confident. This is only applied when predicting during a post-processing step. Set `,_jsx(_components.code,{children:`softmax_temperature=1.0`}),` for no effect. Be advised that `,_jsx(_components.code,{children:`.predict()`}),` does not currently sample, so this setting is only relevant for `,_jsx(_components.code,{children:`.predict_proba()`}),` and `,_jsx(_components.code,{children:`.predict_logits()`}),`.`,_jsx(`br`,{}),_jsx(`br`,{}),`If `,_jsx(_components.code,{children:`\"auto\"`}),` (the default), the temperature is taken from the checkpoint (`,_jsx(_components.code,{children:`InferenceConfig.SOFTMAX_TEMPERATURE`}),`), which is `,_jsx(_components.code,{children:`0.9`}),` for every checkpoint released up to and including v8.5.0. Passing a float overrides the checkpoint for every model in the ensemble; it cannot be combined with a `,_jsx(_components.code,{children:`SOFTMAX_TEMPERATURE`}),` in `,_jsx(_components.code,{children:`inference_config`}),`, which is the other way of naming one.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--balance-probabilities`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`balance_`,_jsx(`wbr`,{}),`probabilities`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsx(_components.td,{children:`Whether to balance the probabilities based on the class distribution in the training data. This can help to improve predictive performance when the classes are highly imbalanced and the metric of interest is insensitive to class imbalance (e.g., balanced accuracy, balanced log loss, roc-auc macro ovo, etc.). This is only applied when predicting during a post-processing step.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--average-before-softmax`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`average_`,_jsx(`wbr`,{}),`before_`,_jsx(`wbr`,{}),`softmax`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsxs(_components.td,{children:[`Only used if `,_jsx(_components.code,{children:`n_estimators > 1`}),`. Whether to average the predictions of the estimators before applying the softmax function. This can help to improve predictive performance when there are many classes or when calibrating the model’s confidence. This is only applied when predicting during a post-processing.`,_jsx(`br`,{}),_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`True`}),`, the predictions are averaged before applying the softmax function. Thus, we average the logits of TabPFN and then apply the softmax.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`False`}),`, the softmax function is applied to each set of logits. Then, we average the resulting probabilities of each forward pass.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--model-path`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`model_`,_jsx(`wbr`,{}),`path`]})]}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`str | `,_jsx(`a`,{href:`https://docs.python.org/3/library/pathlib.html#pathlib.Path`,children:`Path`}),` | list[str] | list[`,_jsx(`a`,{href:`https://docs.python.org/3/library/pathlib.html#pathlib.Path`,children:`Path`}),`] | Literal[“auto”] | `,_jsxs(_components.a,{href:`/api-reference/python/tabpfn/model-persistence#modelspecs`,children:[`Model`,_jsx(`wbr`,{}),`Specs`]}),` | list[`,_jsxs(_components.a,{href:`/api-reference/python/tabpfn/model-persistence#modelspecs`,children:[`Model`,_jsx(`wbr`,{}),`Specs`]}),`]`]})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"auto\"`})}),_jsxs(_components.td,{children:[`The path to the TabPFN model file, i.e., the pre-trained weights. Can be a list of paths to load multiple models. If a list is provided, the models are applied across different estimators.`,_jsx(`br`,{}),_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`\"auto\"`}),`, the model will be downloaded upon first use. This defaults to your system cache directory, but can be overwritten with the use of an environment variable `,_jsx(_components.code,{children:`TABPFN_MODEL_CACHE_DIR`}),`.`,_jsx(`br`,{}),`- If a path or a string of a path, the model will be loaded from the user-specified location if available, otherwise it will be downloaded to this location. Details on available checkpoints are available in the repository README.`,_jsx(`br`,{}),_jsx(`br`,{}),`- If a `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/model-persistence#modelspecs`,children:_jsx(_components.code,{children:`ModelSpecs`})}),` object or list of them, use the in-memory models without loading checkpoints. The same specs can be used with either estimator when the model supports both tasks. Models are used by reference, not copied.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--device`}),_jsx(`code`,{className:`python-reference-parameter`,children:`device`})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/utils.py#L105`,children:[`Devices`,_jsx(`wbr`,{}),`Specification`]})})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"auto\"`})}),_jsxs(_components.td,{children:[`The device(s) to use for inference. See the documentation of `,_jsx(_components.code,{children:`.to()`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--ignore-pretraining-limits`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`ignore_`,_jsx(`wbr`,{}),`pretraining_`,_jsx(`wbr`,{}),`limits`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsxs(_components.td,{children:[`Whether to ignore the pre-training limits of the model. The TabPFN models have been pre-trained on a specific range of input data. If the input data is outside of this range, the model may not perform well. You may ignore our limits to use the model on data outside the pre-training range.`,_jsx(`br`,{}),_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`True`}),`, the model will not raise an error if the input data is outside the pre-training range. Also suppresses error when using the model with a large dataset on CPU.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`False`}),`, you can use the model outside the pre-training range, but the model could perform worse.`,_jsx(`br`,{}),_jsx(`br`,{}),`!!! note`,_jsx(`br`,{}),_jsx(`br`,{}),` For version 2.5, the pre-training limits are:`,_jsx(`br`,{}),_jsx(`br`,{}),` - 50_000 samples/rows`,_jsx(`br`,{}),` - 2_000 features/columns (Note that for more than 500 features we subsample 500 features per estimator. It is therefore important to use a sufficiently large number of `,_jsx(_components.code,{children:`n_estimators`}),`.)`,_jsx(`br`,{}),` - 10 classes, this is not ignorable and will raise an error if the model is used with more classes.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--inference-precision`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`inference_`,_jsx(`wbr`,{}),`precision`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`_dtype | Literal[“autocast”, “auto”]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"auto\"`})}),_jsxs(_components.td,{children:[`The precision to use for inference. This can dramatically affect the speed and reproducibility of the inference. Higher precision can lead to better reproducibility but at the cost of speed. By default, we optimize for speed and use torch’s mixed-precision autocast. The options are:`,_jsx(`br`,{}),_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`torch.dtype`}),`, we force precision of the model and data to be the specified torch.dtype during inference. This can is particularly useful for reproducibility. Here, we do not use mixed-precision.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`\"autocast\"`}),`, enable PyTorch’s mixed-precision autocast. Ensure that your device is compatible with mixed-precision.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`\"auto\"`}),`, we determine whether to use autocast or not depending on the device type.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--fit-mode`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`fit_`,_jsx(`wbr`,{}),`mode`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`Literal[“low_memory”, “fit_preprocessors”, “fit_with_cache”, “batched”]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"fit_preprocessors\"`})}),_jsxs(_components.td,{children:[`Determine how the TabPFN model is “fitted”. The mode determines how the data is preprocessed and cached for inference. This is unique to an in-context learning foundation model like TabPFN, as the “fitting” is technically the forward pass of the model. The options are:`,_jsx(`br`,{}),_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`\"low_memory\"`}),`, the data is preprocessed on-demand during inference when calling `,_jsx(_components.code,{children:`.predict()`}),` or `,_jsx(_components.code,{children:`.predict_proba()`}),`. This is the most memory-efficient mode but can be slower for large datasets because the data is (repeatedly) preprocessed on-the-fly. Ideal with low GPU memory and/or a single call to `,_jsx(_components.code,{children:`.fit()`}),` and `,_jsx(_components.code,{children:`.predict()`}),`.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`\"fit_preprocessors\"`}),`, the data is preprocessed and cached once during the `,_jsx(_components.code,{children:`.fit()`}),` call. During inference, the cached preprocessing (of the training data) is used instead of re-computing it. Ideal with low GPU memory and multiple calls to `,_jsx(_components.code,{children:`.predict()`}),` with the same training data.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`\"fit_with_cache\"`}),`, the data is preprocessed and cached once during the `,_jsx(_components.code,{children:`.fit()`}),` call like in `,_jsx(_components.code,{children:`fit_preprocessors`}),`. Moreover, the transformer key-value cache is also initialized, allowing for much faster inference on the same data at a large cost of memory. Ideal with very high GPU memory and multiple calls to `,_jsx(_components.code,{children:`.predict()`}),` with the same training data.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`\"batched\"`}),`, the already pre-processed data is iterated over in batches. This can only be done after the data has been preprocessed with the get_preprocessed_datasets function. This is primarily used only for inference with the InferenceEngineBatchedNoPreprocessing class in Fine-Tuning. The `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/advanced#fit-from-preprocessed`,children:_jsx(_components.code,{children:`fit_from_preprocessed`})}),`() function sets this attribute internally.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--memory-saving-mode`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`memory_`,_jsx(`wbr`,{}),`saving_`,_jsx(`wbr`,{}),`mode`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/constants.py#L21`,children:[`Memory`,_jsx(`wbr`,{}),`Saving`,_jsx(`wbr`,{}),`Mode`]})})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"auto\"`})}),_jsxs(_components.td,{children:[`Enable GPU/CPU memory saving mode. This can both avoid out-of-memory errors and improve fit+predict speed by reducing memory pressure.`,_jsx(`br`,{}),_jsx(`br`,{}),`It saves memory by automatically batching certain model computations within TabPFN.`,_jsx(`br`,{}),_jsx(`br`,{}),`- If “auto”: memory saving mode is enabled/disabled automatically based on a heuristic`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`True`}),`/`,_jsx(_components.code,{children:`False`}),`: memory saving mode is forced enabled/disabled.`,_jsx(`br`,{}),_jsx(`br`,{}),`If speed is important to your application, you may wish to manually tune this option by comparing the time taken for fit+predict with it set to `,_jsx(_components.code,{children:`False`}),` and `,_jsx(_components.code,{children:`True`}),`.`,_jsx(`br`,{}),_jsx(`br`,{}),`!!! warning This does not batch the original input data. We still recommend to batch the test set as necessary if you run out of memory.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--enable-torch-compile`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`enable_`,_jsx(`wbr`,{}),`torch_`,_jsx(`wbr`,{}),`compile`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsx(_components.td,{children:`Compile the regions supported by the model architecture. Compilation can speed up repeated inference but adds startup cost to the first prediction, or to fitting when building a key-value cache. Disabled by default. Architectures without compilation support ignore it. v3.5 compilation requires PyTorch 2.6 or newer.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--keep-cache-on-device`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`keep_`,_jsx(`wbr`,{}),`cache_`,_jsx(`wbr`,{}),`on_`,_jsx(`wbr`,{}),`device`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`True`})}),_jsxs(_components.td,{children:[`Only relevant when `,_jsx(_components.code,{children:`fit_mode=\"fit_with_cache\"`}),`. If `,_jsx(_components.code,{children:`True`}),` (default), the key-value cache is kept on the inference device (e.g. GPU). Uses more device memory but gives lower latency. If `,_jsx(_components.code,{children:`False`}),`, the cache is stored on CPU.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--kv-cache-precision`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`kv_`,_jsx(`wbr`,{}),`cache_`,_jsx(`wbr`,{}),`precision`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`Literal[“auto”, “int8”, “fp8”, “adaptive”] | None`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsxs(_components.td,{children:[`Only relevant when `,_jsx(_components.code,{children:`fit_mode=\"fit_with_cache\"`}),`. Resolved against what the model architecture supports. `,_jsx(_components.code,{children:`None`}),` (default) picks the architecture default (`,_jsx(_components.code,{children:`\"int8\"`}),` when it can quantize, e.g. TabPFN-3, else `,_jsx(_components.code,{children:`\"auto\"`}),`); `,_jsx(_components.code,{children:`\"int8\"`}),` quantizes the key-value cache to save memory; `,_jsx(_components.code,{children:`\"fp8\"`}),` stores it as 8-bit floats instead (same size, float rounding semantics; not supported on MPS); `,_jsx(_components.code,{children:`\"auto\"`}),` keeps the computed dtype; `,_jsx(_components.code,{children:`\"adaptive\"`}),` stores the cache on the grid an attention backend already rounded the keys and values to (one that declares `,_jsx(_components.code,{children:`kv_grid_dtype`}),` and took the call), and as `,_jsx(_components.code,{children:`\"int8\"`}),` otherwise. Requesting a quantized precision on an architecture that cannot quantize warns and falls back to `,_jsx(_components.code,{children:`\"auto\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--random-state`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`random_`,_jsx(`wbr`,{}),`state`]})]}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`int | np.random.Random`,_jsx(`wbr`,{}),`State | np.random.Generator | None`]})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0`})}),_jsxs(_components.td,{children:[`Controls the randomness of the model. Pass an int for reproducible results and see the scikit-learn glossary for more information. If `,_jsx(_components.code,{children:`None`}),`, the randomness is determined by the system when calling `,_jsx(_components.code,{children:`.fit()`}),`.`,_jsx(`br`,{}),_jsx(`br`,{}),`!!! warning We depart from the usual scikit-learn behavior in that by default we provide a fixed seed of `,_jsx(_components.code,{children:`0`}),`.`,_jsx(`br`,{}),_jsx(`br`,{}),`!!! note Even if a seed is passed, we cannot always guarantee reproducibility due to PyTorch’s non-deterministic operations and general numerical instability. To get the most reproducible results across hardware, we recommend using a higher precision as well (at the cost of a much higher inference time). Likewise, for scikit-learn, consider passing `,_jsx(_components.code,{children:`USE_SKLEARN_16_DECIMAL_PRECISION=True`}),` as kwarg.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--n-jobs`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`n_`,_jsx(`wbr`,{}),`jobs`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`int | None`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsxs(_components.td,{children:[`Deprecated, use `,_jsx(_components.code,{children:`n_preprocessing_jobs`}),` instead. This parameter never had any effect.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--n-preprocessing-jobs`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`n_`,_jsx(`wbr`,{}),`preprocessing_`,_jsx(`wbr`,{}),`jobs`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`int`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsxs(_components.td,{children:[`The number of worker threads to use for the preprocessing.`,_jsx(`br`,{}),_jsx(`br`,{}),`If `,_jsx(_components.code,{children:`1`}),`, the preprocessing runs in the calling thread. If `,_jsx(_components.code,{children:`>1`}),` and `,_jsx(_components.code,{children:`n_estimators > 1`}),`, the estimators are preprocessed on that many threads, which speeds up the fit on large tables. Threads beyond `,_jsx(_components.code,{children:`n_estimators`}),` are unused.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--inference-config`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`inference_`,_jsx(`wbr`,{}),`config`]})]}),_jsxs(_components.td,{children:[_jsxs(`code`,{className:`python-reference-type`,children:[`dict | `,_jsxs(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:[`Inference`,_jsx(`wbr`,{}),`Config`]}),` | None`]}),_jsx(`br`,{}),_jsxs(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:[_jsx(`code`,{children:`InferenceConfig`}),` options`]})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsxs(_components.td,{children:[`For advanced users, additional advanced arguments that adjust the behavior of the model interface. See `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:_jsx(_components.code,{children:`tabpfn.inference_config.InferenceConfig`})}),` for details and options.`,_jsx(`br`,{}),_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`None`}),`, the default `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:_jsx(_components.code,{children:`InferenceConfig`})}),` is used.`,_jsx(`br`,{}),`- If `,_jsx(_components.code,{children:`dict`}),`, the key-value pairs are used to update the default `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:_jsx(_components.code,{children:`InferenceConfig`})}),`. Raises an error if an unknown key is passed.`,_jsx(`br`,{}),`- If `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:_jsx(_components.code,{children:`InferenceConfig`})}),`, the object replaces the checkpoint’s config as a whole, so any field not set on it takes a class default rather than the value the checkpoint declares. Deprecated.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--differentiable-input`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`differentiable_`,_jsx(`wbr`,{}),`input`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsx(_components.td,{children:`If true, the preprocessing will be adapted to be end-to-end differentiable with PyTorch. This is useful for explainability and prompt-tuning, essential in the prompttuning code.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--eval-metric`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`eval_`,_jsx(`wbr`,{}),`metric`]})]}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`str | `,_jsxs(_components.a,{href:`/api-reference/python/tabpfn/inference-tuning#classifierevalmetrics`,children:[`Classifier`,_jsx(`wbr`,{}),`Eval`,_jsx(`wbr`,{}),`Metrics`]}),` | None`]})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsxs(_components.td,{children:[`Metric by which predictions will be ultimately evaluated on test data. This can be used to improve this metric on validation data by calibrating the model’s probabilities and tuning the decision thresholds during the `,_jsx(_components.code,{children:`fit()/predict()`}),` calls. The tuning can be enabled by configuring the `,_jsx(_components.code,{children:`tuning_config`}),` argument, see below. For currently supported metrics, see `,_jsx(_components.code,{children:`tabpfn.classifier.ClassifierEvalMetrics`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--tuning-config`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`tuning_`,_jsx(`wbr`,{}),`config`]})]}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`dict | `,_jsxs(_components.a,{href:`/api-reference/python/tabpfn/inference-tuning#classifiertuningconfig`,children:[`Classifier`,_jsx(`wbr`,{}),`Tuning`,_jsx(`wbr`,{}),`Config`]}),` | None`]})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsxs(_components.td,{children:[`The settings to use to tune the model’s predictions for the specified `,_jsx(_components.code,{children:`eval_metric`}),`. See `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/inference-tuning#classifiertuningconfig`,children:_jsx(_components.code,{children:`tabpfn.inference_tuning.ClassifierTuningConfig`})}),` for details and options.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`constructor--show-progress-bar`}),_jsxs(`code`,{className:`python-reference-parameter`,children:[`show_`,_jsx(`wbr`,{}),`progress_`,_jsx(`wbr`,{}),`bar`]})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsxs(_components.td,{children:[`Whether to show a progress bar during inference. Defaults to `,_jsx(_components.code,{children:`False`}),`.`]})]})]})]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Usage guidance`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`TabPFN-3 and later versions support up to 1,000,000 rows, subject to\nfeature count, checkpoint limits, and memory.`}),`\n`,_jsxs(_components.li,{children:[`For large datasets or limited memory, use per-estimator subsampling,\ne.g. `,_jsx(_components.code,{children:`inference_config={\"SUBSAMPLE_SAMPLES\": 50_000}`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Pass raw pandas DataFrames to `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#fit`,children:_jsx(_components.code,{children:`fit`})}),` and `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#predict`,children:_jsx(_components.code,{children:`predict`})}),`. Categorical\nstrings/categories and missing feature values are handled automatically;\nno manual integer/one-hot encoding, imputation, scaling, or outlier\nremoval is needed.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Attributes`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Attribute`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`configs_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`list[`,_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/architectures/interface.py#L18`,children:[`Architecture`,_jsx(`wbr`,{}),`Config`]}),`]`]})}),_jsxs(_components.td,{children:[`The configurations of the loaded models to be used for inference.`,_jsx(`br`,{}),_jsx(`br`,{}),`The concrete type of these configs is defined by the architectures in use and should be inspected at runtime, but they will be subclasses of `,_jsx(_components.a,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/architectures/interface.py#L18`,children:_jsx(_components.code,{children:`ArchitectureConfig`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`models_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`list[`,_jsx(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/architectures/interface.py#L185`,children:`Architecture`}),`]`]})}),_jsxs(_components.td,{children:[`The loaded models to be used for inference.`,_jsx(`br`,{}),_jsx(`br`,{}),`The models can be different PyTorch modules, but will be subclasses of `,_jsx(_components.a,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/architectures/interface.py#L185`,children:_jsx(_components.code,{children:`Architecture`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`inference_config_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:[`Inference`,_jsx(`wbr`,{}),`Config`]})})}),_jsx(_components.td,{children:`Additional configuration of the interface for expert users.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`devices_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`tuple[torch.device, …]`})}),_jsxs(_components.td,{children:[`The devices determined to be used.`,_jsx(`br`,{}),_jsx(`br`,{}),`The devices are determined based on the `,_jsx(_components.code,{children:`device`}),` argument to the constructor, and the devices available on the system. See the constructor documentation for details.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`feature_names_in_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`npt.ND`,_jsx(`wbr`,{}),`Array[Any]`]})}),_jsxs(_components.td,{children:[`The feature names of the input data.`,_jsx(`br`,{}),_jsx(`br`,{}),`May not be set if the input data does not have feature names, such as with a numpy array.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`n_features_in_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`int`})}),_jsxs(_components.td,{children:[`The number of features in the input data used during `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#fit`,children:_jsx(_components.code,{children:`fit()`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`n_train_samples_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`int`})}),_jsxs(_components.td,{children:[`The number of training samples used during `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#fit`,children:_jsx(_components.code,{children:`fit()`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`inferred_feature_schema_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/preprocessing/datamodel.py#L145`,children:[`Feature`,_jsx(`wbr`,{}),`Schema`]})})}),_jsx(_components.td,{children:`The inferred feature schema. This contains the feature modalities per column, using heuristics and user-provided indices for categorical features.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`classes_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`npt.ND`,_jsx(`wbr`,{}),`Array[Any]`]})}),_jsxs(_components.td,{children:[`The unique classes found in the target data during `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#fit`,children:_jsx(_components.code,{children:`fit()`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`n_classes_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`int`})}),_jsxs(_components.td,{children:[`The number of classes found in the target data during `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#fit`,children:_jsx(_components.code,{children:`fit()`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`class_counts_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`npt.ND`,_jsx(`wbr`,{}),`Array[Any]`]})}),_jsxs(_components.td,{children:[`The number of classes per class found in the target data during `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#fit`,children:_jsx(_components.code,{children:`fit()`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`n_outputs_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`Literal[1]`})}),_jsx(_components.td,{children:`The number of outputs the model has. Only 1 for now`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`use_autocast_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`bool`})}),_jsx(_components.td,{children:`Whether torch’s autocast should be used.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`forced_inference_dtype_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`_dtype | None`})}),_jsxs(_components.td,{children:[`The forced inference dtype for the model based on `,_jsx(_components.code,{children:`inference_precision`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`executor_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/inference.py#L311`,children:[`Inference`,_jsx(`wbr`,{}),`Engine`]})})}),_jsx(_components.td,{children:`The inference engine used to make predictions.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`label_encoder_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/preprocessing/label_encoder.py#L25`,children:[`Tab`,_jsx(`wbr`,{}),`PFN`,_jsx(`wbr`,{}),`Label`,_jsx(`wbr`,{}),`Encoder`]})})}),_jsx(_components.td,{children:`The label encoder used to encode the target variable.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ordinal_encoder_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/preprocessing/steps/preprocessing_helpers.py#L471`,children:[`Order`,_jsx(`wbr`,{}),`Preserving`,_jsx(`wbr`,{}),`Column`,_jsx(`wbr`,{}),`Transformer`]})})}),_jsx(_components.td,{children:`The column transformer used to preprocess categorical data to be numeric.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`date_transformer_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/preprocessing/datetimes.py#L52`,children:[`Date`,_jsx(`wbr`,{}),`Transformer`]})})}),_jsx(_components.td,{children:`The transformer that converted every temporal column before validation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text_transformer_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(`a`,{href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/preprocessing/text.py#L61`,children:[`Text`,_jsx(`wbr`,{}),`Transformer`]})})}),_jsx(_components.td,{children:`The transformer that expanded every text column before validation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`categorical_features_indices_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`list[int] | None`})}),_jsxs(_components.td,{children:[`Declared categorical column positions after date/text expansion, including columns declared through pandas `,_jsx(_components.code,{children:`category`}),` dtype. Expanded source columns are removed and their generated features appended, so these positions can differ from those in the original fit input.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tuned_classification_thresholds_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`npt.ND`,_jsx(`wbr`,{}),`Array[Any] | None`]})}),_jsxs(_components.td,{children:[`The tuned classification thresholds for each class or `,_jsx(_components.code,{children:`None`}),` if no tuning is specified.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`eval_metric_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(_components.a,{href:`/api-reference/python/tabpfn/inference-tuning#classifierevalmetrics`,children:[`Classifier`,_jsx(`wbr`,{}),`Eval`,_jsx(`wbr`,{}),`Metrics`]})})}),_jsx(_components.td,{children:`The validated evaluation metric to optimize for during prediction.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`softmax_temperature_`})}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`float`})}),_jsxs(_components.td,{children:[`The softmax temperature used for prediction. This is the resolved `,_jsx(_components.code,{children:`softmax_temperature`}),`, i.e. the one the checkpoint declares when no temperature tuning is done.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ensemble_configs_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[`list[`,_jsxs(_components.a,{href:`/api-reference/python/tabpfn/preprocessing/configuration#classifierensembleconfig`,children:[`Classifier`,_jsx(`wbr`,{}),`Ensemble`,_jsx(`wbr`,{}),`Config`]}),`]`]})}),_jsx(_components.td,{children:`The ensemble configurations used during fit. Stored for reuse in prompt tuning.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`downsample_correction_weights_`})}),_jsx(_components.td,{children:_jsxs(`code`,{className:`python-reference-type`,children:[_jsx(`a`,{href:`https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html`,children:`np.ndarray`}),` | None`]})}),_jsxs(_components.td,{children:[`Per-class weights that undo the prior shift of `,_jsx(_components.code,{children:`SAMPLE_SUBSAMPLING_METHOD=\"majority_downsample\"`}),`, applied to the averaged probabilities. `,_jsx(_components.code,{children:`None`}),` when that sampler is not in effect.`]})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(`div`,{className:`python-reference-heading`,children:[_jsx(Heading,{level:`2`,id:`create-default-for-version`,children:_jsx(_components.code,{children:`TabPFNClassifier.create_default_for_version`})}),_jsxs(`a`,{className:`python-reference-source`,href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L619`,\"aria-label\":`View source for TabPFNClassifier.create_default_for_version`,children:[_jsx(`span`,{\"aria-hidden\":`true`,children:`\u003c/>`}),` View source `,_jsx(`span`,{\"aria-hidden\":`true`,children:`↗`})]})]}),`\n`,_jsx(_components.p,{children:`Construct a classifier that uses the given version of the model.`}),`\n`,_jsx(_components.p,{children:`In addition to selecting the model, this also configures certain settings to the\ndefault values associated with this model version.`}),`\n`,_jsx(_components.p,{children:`Any kwargs will override the default settings.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`TabPFNClassifier.create_default_for_version(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` version: ModelVersion,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` **`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`overrides,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Self`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Parameters`})}),`\n`,_jsx(`div`,{className:`python-reference-table`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`create-default-for-version--version`}),_jsx(`code`,{className:`python-reference-parameter`,children:`version`})]}),_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(_components.a,{href:`/api-reference/python/tabpfn/model-versions#modelversion`,children:[`Model`,_jsx(`wbr`,{}),`Version`]})})}),_jsx(_components.td,{children:`Required`}),_jsx(_components.td,{children:`—`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(`span`,{id:`create-default-for-version--overrides`}),_jsx(`code`,{className:`python-reference-parameter`,children:`**overrides`})]}),_jsxs(_components.td,{children:[`—`,_jsx(`br`,{}),_jsxs(_components.a,{href:`/api-reference/python/tabpfn/classifier/configuration#constructor`,children:[_jsx(`code`,{children:`TabPFNClassifier`}),` options`]})]}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`—`})]})]})]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Returns`})}),`\n`,_jsx(`div`,{className:`python-reference-table python-reference-returns`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/configuration#constructor`,children:`Self`})})}),_jsx(_components.td,{children:`—`})]})})]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(`div`,{className:`python-reference-heading`,children:[_jsx(Heading,{level:`2`,id:`estimator-type`,children:_jsx(_components.code,{children:`TabPFNClassifier.estimator_type`})}),_jsxs(`a`,{className:`python-reference-source`,href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L678`,\"aria-label\":`View source for TabPFNClassifier.estimator_type`,children:[_jsx(`span`,{\"aria-hidden\":`true`,children:`\u003c/>`}),` View source `,_jsx(`span`,{\"aria-hidden\":`true`,children:`↗`})]})]}),`\n`,_jsx(_components.p,{children:`The type of the model.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Returns`})}),`\n`,_jsx(`div`,{className:`python-reference-table python-reference-returns`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`Literal[“classifier”]`})}),_jsx(_components.td,{children:`—`})]})})]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(`div`,{className:`python-reference-heading`,children:[_jsx(Heading,{level:`2`,id:`model`,children:_jsx(_components.code,{children:`TabPFNClassifier.model_`})}),_jsxs(`a`,{className:`python-reference-source`,href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L683`,\"aria-label\":`View source for TabPFNClassifier.model_`,children:[_jsx(`span`,{\"aria-hidden\":`true`,children:`\u003c/>`}),` View source `,_jsx(`span`,{\"aria-hidden\":`true`,children:`↗`})]})]}),`\n`,_jsx(_components.p,{children:`The model used for inference.`}),`\n`,_jsx(_components.p,{children:`This is set after the model is loaded and initialized.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Returns`})}),`\n`,_jsx(`div`,{className:`python-reference-table python-reference-returns`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:`Architecture`})}),_jsx(_components.td,{children:`—`})]})})]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(`div`,{className:`python-reference-heading`,children:[_jsx(Heading,{level:`2`,id:`get-inference-config`,children:_jsx(_components.code,{children:`TabPFNClassifier.get_inference_config`})}),_jsxs(`a`,{className:`python-reference-source`,href:`https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L700`,\"aria-label\":`View source for TabPFNClassifier.get_inference_config`,children:[_jsx(`span`,{\"aria-hidden\":`true`,children:`\u003c/>`}),` View source `,_jsx(`span`,{\"aria-hidden\":`true`,children:`↗`})]})]}),`\n`,_jsx(_components.p,{children:`Load the model if needed and return the active inference config.`}),`\n`,_jsxs(_components.p,{children:[`Loads the model checkpoint without requiring fit data so the config can be\ninspected before calling `,_jsx(_components.a,{href:`/api-reference/python/tabpfn/classifier/fitting-and-prediction#fit`,children:_jsx(_components.code,{children:`fit()`})}),`. Any `,_jsx(_components.code,{children:`inference_config`}),` override\npassed to the constructor is considered.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`TabPFNClassifier.get_inference_config() `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` InferenceConfig`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Returns`})}),`\n`,_jsx(`div`,{className:`python-reference-table python-reference-returns`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(`code`,{className:`python-reference-type`,children:_jsxs(_components.a,{href:`/api-reference/python/tabpfn/inference-config#inferenceconfig`,children:[`Inference`,_jsx(`wbr`,{}),`Config`]})})}),_jsx(_components.td,{children:`A deep copy of the active inference config.`})]})})]})}),`\n`,_jsx(Heading,{level:`2`,id:`scikit-learn-methods`,children:`Scikit-learn methods`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator.get_params`,children:_jsx(_components.code,{children:`get_params`})}),` and `,_jsx(_components.a,{href:`https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html#sklearn.base.BaseEstimator.set_params`,children:_jsx(_components.code,{children:`set_params`})}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Constructor and configuration","description":"TabPFN classifier with a scikit-learn-compatible interface.","href":"/api-reference/python/tabpfn/classifier/configuration"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"TabPFNClassifier","slug":"constructor","depth":2,"children":[]},{"title":"TabPFNClassifier.create_default_for_version","slug":"create-default-for-version","depth":2,"children":[]},{"title":"TabPFNClassifier.estimator_type","slug":"estimator-type","depth":2,"children":[]},{"title":"TabPFNClassifier.model_","slug":"model","depth":2,"children":[]},{"title":"TabPFNClassifier.get_inference_config","slug":"get-inference-config","depth":2,"children":[]},{"title":"Scikit-learn methods","slug":"scikit-learn-methods","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/priorlabs/dc47dfb9d8e46daa/cookieyes.js","/_mintlify/custom/priorlabs/d8ce73b7f7a5de7b/posthog-consent.js","/_mintlify/custom/priorlabs/bd145ba8c5f78a12/cookbook-filter.js","/_mintlify/custom/priorlabs/4fffc985e576f41c/research-filter.js","/_mintlify/custom/priorlabs/09720b48fd3a180c/tabarena-switch.js"],"subdomain":"priorlabs","siteName":"Prior Labs","title":"Constructor and configuration - Prior Labs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T13:18:58.665Z","originalFileLocation":"api-reference/python/tabpfn/classifier/configuration.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"TabPFN classifier with a scikit-learn-compatible interface.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prior Labs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Constructor and configuration - Prior Labs\">\u003cmeta data-mint-head property=\"og:description\" content=\"TabPFN classifier with a scikit-learn-compatible interface.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prior Labs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://priorlabs.mintlify.site/_mintlify/api/og/v2?division=TabPFNClassifier\u0026amp;title=Constructor+and+configuration\u0026amp;description=TabPFN+classifier+with+a+scikit-learn-compatible+interface.\u0026amp;theme=cfa6251b37c93e730460b4c0\u0026amp;signature=1d58fca3c4e8e0006b7a331a19388a8ddaf76957928066176cc615ad598064a0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Constructor and configuration - Prior Labs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"TabPFN classifier with a scikit-learn-compatible interface.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://priorlabs.mintlify.site/_mintlify/api/og/v2?division=TabPFNClassifier\u0026amp;title=Constructor+and+configuration\u0026amp;description=TabPFN+classifier+with+a+scikit-learn-compatible+interface.\u0026amp;theme=cfa6251b37c93e730460b4c0\u0026amp;signature=1d58fca3c4e8e0006b7a331a19388a8ddaf76957928066176cc615ad598064a0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/priorlabs/ezqAkuYrXl_TJelR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prior Labs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#101075\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/python/tabpfn/classifier/configuration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.priorlabs.ai/#organization\",\"name\":\"Prior Labs\",\"url\":\"https://docs.priorlabs.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/priorlabs/t197PY0EpQCr-YHY/logo/light.svg?fit=max\u0026auto=format\u0026n=t197PY0EpQCr-YHY\u0026q=85\u0026s=33643e275cfc08c99769e1719c4f53c2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.priorlabs.ai#website\",\"name\":\"Prior Labs\",\"url\":\"https://docs.priorlabs.ai\",\"publisher\":{\"@id\":\"https://docs.priorlabs.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration#webpage\",\"url\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration\",\"name\":\"Constructor and configuration\",\"description\":\"TabPFN classifier with a scikit-learn-compatible interface.\",\"dateModified\":\"2026-11-04T13:18:58.665Z\",\"isPartOf\":{\"@id\":\"https://docs.priorlabs.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"tabpfn\",\"item\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Constructor and configuration\",\"item\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration#article\",\"headline\":\"Constructor and configuration\",\"name\":\"Constructor and configuration\",\"description\":\"TabPFN classifier with a scikit-learn-compatible interface.\",\"url\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/configuration#webpage\"},\"dateModified\":\"2026-11-04T13:18:58.665Z\",\"publisher\":{\"@id\":\"https://docs.priorlabs.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.priorlabs.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Prior Labs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Prior Labs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/python/tabpfn/classifier/configuration.md","siteName":"Prior Labs","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/priorlabs/tabpfn"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/VJRuU3bSxt"},{"anchor":"Colab Demo","icon":"book","href":"https://colab.research.google.com/github/PriorLabs/TabPFN/blob/main/examples/notebooks/TabPFN_Demo_Local.ipynb"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"/changelog"}]},"tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/overview"}]},{"tab":"Cookbook","icon":"hat-chef","pages":[{"title":"Cookbook","href":"/cookbook"}]},{"tab":"API reference","icon":"code","groups":[{"group":"Reference","pages":[{"title":"API reference","href":"/api-reference/overview"}]},{"group":"tabpfn","pages":[{"sidebarTitle":"Overview","title":"tabpfn","description":"Install TabPFN and browse the local Python package reference.","href":"/api-reference/python/tabpfn/overview"},{"group":"TabPFNClassifier","expanded":false,"pages":[{"title":"Constructor and configuration","href":"/api-reference/python/tabpfn/classifier/configuration"},{"title":"Fitting and prediction","description":"Fit the model.","href":"/api-reference/python/tabpfn/classifier/fitting-and-prediction"},{"title":"Embeddings","href":"/api-reference/python/tabpfn/classifier/embeddings"},{"title":"Batched and differentiable inference","href":"/api-reference/python/tabpfn/classifier/advanced"},{"title":"Persistence and devices","href":"/api-reference/python/tabpfn/classifier/persistence"}]},{"group":"TabPFNRegressor","expanded":false,"pages":[{"title":"Constructor and configuration","href":"/api-reference/python/tabpfn/regressor/configuration"},{"title":"Fitting and prediction","href":"/api-reference/python/tabpfn/regressor/fitting-and-prediction"},{"title":"Embeddings","href":"/api-reference/python/tabpfn/regressor/embeddings"},{"title":"Batched and differentiable inference","href":"/api-reference/python/tabpfn/regressor/advanced"},{"title":"Persistence and devices","href":"/api-reference/python/tabpfn/regressor/persistence"},{"title":"Predictive distributions","href":"/api-reference/python/tabpfn/regressor/predictive-distributions"}]},{"title":"Inference configuration","href":"/api-reference/python/tabpfn/inference-config"},{"title":"Inference tuning","href":"/api-reference/python/tabpfn/inference-tuning"},{"title":"Model versions","href":"/api-reference/python/tabpfn/model-versions"},{"title":"Model persistence","href":"/api-reference/python/tabpfn/model-persistence"},{"title":"Diagnostics and errors","href":"/api-reference/python/tabpfn/diagnostics"},{"group":"Fine-tuning","expanded":false,"pages":[{"title":"Batch and evaluation types","href":"/api-reference/python/tabpfn/finetuning/data"},{"title":"Fine-tuning base class","href":"/api-reference/python/tabpfn/finetuning/base"},{"title":"Fine-tuned classifier","href":"/api-reference/python/tabpfn/finetuning/classifier"},{"title":"Fine-tuned regressor","href":"/api-reference/python/tabpfn/finetuning/regressor"},{"title":"Experiment logging","href":"/api-reference/python/tabpfn/finetuning/logging"}]},{"group":"Preprocessing","expanded":false,"pages":[{"title":"Preprocessing configuration","href":"/api-reference/python/tabpfn/preprocessing/configuration"},{"title":"Preprocessing pipelines","href":"/api-reference/python/tabpfn/preprocessing/pipeline"},{"title":"Preprocessor presets","href":"/api-reference/python/tabpfn/preprocessing/presets"}]}]},{"group":"tabpfn-client","pages":[{"sidebarTitle":"Overview","title":"tabpfn-client","href":"/api-reference/python/tabpfn-client/overview"},{"group":"TabPFNClassifier","expanded":false,"pages":[{"title":"Constructor and configuration","href":"/api-reference/python/tabpfn-client/classifier/configuration"},{"title":"Fitting and prediction","href":"/api-reference/python/tabpfn-client/classifier/fitting-and-prediction"},{"title":"Model selection and persistence","href":"/api-reference/python/tabpfn-client/classifier/model-selection-and-persistence"}]},{"group":"TabPFNRegressor","expanded":false,"pages":[{"title":"Constructor and configuration","href":"/api-reference/python/tabpfn-client/regressor/configuration"},{"title":"Fitting and prediction","href":"/api-reference/python/tabpfn-client/regressor/fitting-and-prediction"},{"title":"Model selection and persistence","href":"/api-reference/python/tabpfn-client/regressor/model-selection-and-persistence"},{"title":"Predictive distributions","href":"/api-reference/python/tabpfn-client/regressor/predictive-distributions"}]},{"title":"Authentication","href":"/api-reference/python/tabpfn-client/authentication"},{"title":"Configuration","href":"/api-reference/python/tabpfn-client/configuration"},{"title":"Usage and costs","href":"/api-reference/python/tabpfn-client/usage-and-costs"},{"title":"UserDataClient","href":"/api-reference/python/tabpfn-client/user-data"},{"group":"Deployment backends","expanded":false,"pages":[{"title":"Self-hosted HTTP","href":"/api-reference/python/tabpfn-client/backends/hosted"},{"title":"SageMaker","href":"/api-reference/python/tabpfn-client/backends/sagemaker"},{"title":"Azure Foundry","href":"/api-reference/python/tabpfn-client/backends/foundry"}]},{"title":"Exceptions","href":"/api-reference/python/tabpfn-client/exceptions"},{"title":"SHAP explanations","href":"/api-reference/python/tabpfn-client/explain"}]},{"group":"tabpfn-extensions","pages":[{"sidebarTitle":"Overview","title":"tabpfn-extensions","href":"/api-reference/python/tabpfn-extensions/overview"},{"group":"Interpretability","root":{"title":"Interpretability","href":"/api-reference/python/tabpfn-extensions/interpretability"},"expanded":false,"pages":[{"title":"Shapley explainers","href":"/api-reference/python/tabpfn-extensions/interpretability/shapley-explainers"},{"title":"Partial dependence","href":"/api-reference/python/tabpfn-extensions/interpretability/partial-dependence"},{"title":"Feature selection","href":"/api-reference/python/tabpfn-extensions/interpretability/feature-selection"},{"title":"Decoder readout","href":"/api-reference/python/tabpfn-extensions/interpretability/decoder-readout"}]},{"title":"Conformal prediction with missing data","href":"/api-reference/python/tabpfn-extensions/cp-missing-data"},{"title":"Hurdle regression","href":"/api-reference/python/tabpfn-extensions/hurdle"},{"title":"Many-class classification","href":"/api-reference/python/tabpfn-extensions/many-class"},{"title":"Embeddings","href":"/api-reference/python/tabpfn-extensions/embedding"},{"group":"Images","root":{"title":"Images","href":"/api-reference/python/tabpfn-extensions/image"},"expanded":false,"pages":[{"title":"Image transformer","href":"/api-reference/python/tabpfn-extensions/image/transformer"},{"title":"Image estimator","href":"/api-reference/python/tabpfn-extensions/image/estimator"}]},{"group":"Unsupervised learning","root":{"title":"Unsupervised learning","href":"/api-reference/python/tabpfn-extensions/unsupervised"},"expanded":false,"pages":[{"title":"Model and fitting","href":"/api-reference/python/tabpfn-extensions/unsupervised/model"},{"title":"Imputation and data generation","href":"/api-reference/python/tabpfn-extensions/unsupervised/imputation"},{"title":"Anomaly detection","href":"/api-reference/python/tabpfn-extensions/unsupervised/outliers"},{"title":"Unsupervised embeddings","href":"/api-reference/python/tabpfn-extensions/unsupervised/embeddings"},{"title":"Unsupervised experiments","href":"/api-reference/python/tabpfn-extensions/unsupervised/experiments"}]},{"title":"Energy-based data generation","href":"/api-reference/python/tabpfn-extensions/tabebm"},{"title":"Bayesian optimization","href":"/api-reference/python/tabpfn-extensions/bayesian-optimization"},{"title":"Conditional randomization tests","href":"/api-reference/python/tabpfn-extensions/pval-crt"},{"title":"Survival analysis","href":"/api-reference/python/tabpfn-extensions/survival"},{"title":"Experiments","href":"/api-reference/python/tabpfn-extensions/benchmarking"},{"title":"Scoring","href":"/api-reference/python/tabpfn-extensions/scoring"},{"title":"Utilities","href":"/api-reference/python/tabpfn-extensions/utils"}]},{"group":"tabpfn-rel","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"tabpfn-rel","href":"/api-reference/python/tabpfn-rel/overview"},{"title":"TabPFNRel","href":"/api-reference/python/tabpfn-rel/estimator"},{"title":"Model backends","href":"/api-reference/python/tabpfn-rel/models"},{"title":"Search spaces","href":"/api-reference/python/tabpfn-rel/search-spaces"},{"group":"Context and queries (RPI)","expanded":false,"pages":[{"title":"Predictive context","href":"/api-reference/python/relarena-core/context"},{"title":"Prediction queries","href":"/api-reference/python/relarena-core/query"},{"title":"Fitted predictor","href":"/api-reference/python/relarena-core/fitted-predictor"},{"title":"Database and task specifications","href":"/api-reference/python/relarena-core/specifications"}]}]},{"group":"REST API","icon":"code","pages":[{"title":"Prepare train set upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /tabpfn/prepare_train_set_upload","href":"/api-reference/training/prepare-train-set-upload"},{"title":"Get model limits","deprecated":true,"version":null,"openapi":"/api-reference/openapi.json get /tabpfn/get_model_limits","href":"/api-reference/training/get-model-limits"},{"title":"Fit (TabPFN JSON API)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /tabpfn/fit","href":"/api-reference/training/fit-tabpfn-json-api"},{"title":"Prepare test set upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /tabpfn/prepare_test_set_upload","href":"/api-reference/prediction/prepare-test-set-upload"},{"title":"Predict (TabPFN JSON API)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /tabpfn/predict","href":"/api-reference/prediction/predict-tabpfn-json-api"}]}]},{"tab":"Blog","icon":"newspaper","href":"https://priorlabs.ai/blog#articles"}]},"basePath":"","title":"Constructor and configuration - Prior Labs","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["10e4515597"],"chunks":["BannerMarkdown-BOAJk9BH.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}