autogluon.tabular.models¶
Note
This documentation is for advanced users, and is not comprehensive.
For a stable public API, refer to TabularPredictor.
Model Keys¶
To fit a model with TabularPredictor, you must specify it in the TabularPredictor.fit hyperparameters argument.
hyperparameters takes in a dictionary of models, where each key is a model name, and the values are a list of dictionaries of model hyperparameters.
For example:
Here is the mapping of keys to models:
Here is the mapping of model types to their default names when trained:
Model Name Suffixes¶
Models trained by TabularPredictor can have suffixes in their names that have special meanings.
The suffixes are as follows:
“_Lx”: Indicates the stack level (x) the model is trained in, such as “_L1”, “_L2”, etc. A model with “_L1” suffix is a base model, meaning it does not depend on any other models. If a model lacks this suffix, then it is a base model and is at level 1 (“_L1”).
“/Tx”: Indicates that the model was trained via hyperparameter search (HPO). Tx is shorthand for HPO trial #x. An example would be “LightGBM/T8”.
“_BAG”: Indicates that the model is a bagged ensemble. A bagged ensemble contains multiple instances of the model (children) trained with different subsets of the data. During inference, these child models each predict on the data and their predictions are averaged in the final result. This typically achieves a stronger result than any of the individual models alone, but slows down inference speed significantly. Refer to “_FULL” for instructions on how to improve inference speed.
“_FULL”: Indicates the model has been refit via TabularPredictor’s refit_full method. This model will have no validation score because all of the data (train and validation) was used as training data. Usually, there will be another model with the same name as this model minus the “_FULL” suffix. Often, this model can outperform the original model because of using more data during training, but is usually weaker if the original was a bagged ensemble (“_BAG”), but with much faster inference speed.
“_DSTL”: Indicates the model was created through model distillation via a call to TabularPredictor’s distill method. Validation scores of distilled models should only be compared against other distilled models.
“_x”: Indicates that the name without this added suffix already existed in a different model, so this suffix was added to avoid overwriting the pre-existing model. An example would be “LightGBM_2”.
Models¶
Abstract model implementation from which all AutoGluon models inherit. |
|
LightGBM model: https://lightgbm.readthedocs.io/en/latest/ |
|
CatBoost model: https://catboost.ai/ |
|
XGBoost model: https://xgboost.readthedocs.io/en/latest/ |
|
Random Forest model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html |
|
Extra Trees model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.ExtraTreesClassifier.html#sklearn.ensemble.ExtraTreesClassifier |
|
KNearestNeighbors model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html |
|
Linear model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html |
|
PyTorch neural network models for classification/regression with tabular data. |
|
Class for fastai v1 neural network models that operate on tabular data. |
|
VowpalWabbit Model: https://vowpalwabbit.org/ |
|
MultimodalPredictor that doesn't use image features |
|
MultimodalPredictor that only uses image features. Currently only supports 1 image column, with 1 image per sample. Additionally has special null image handling to improve performance in the presence of null images (aka image path of '') Note: null handling has not been compared to the built-in null handling of MultimodalPredictor yet. |
AbstractModel¶
- class autogluon.tabular.models.AbstractModel(path: str | None = None, name: str | None = None, problem_type: str | None = None, eval_metric: str | Scorer | None = None, hyperparameters: dict | None = None)[source]¶
Abstract model implementation from which all AutoGluon models inherit.
- Parameters:
path (str, default = None) – Directory location to store all outputs. If None, a new unique time-stamped directory is chosen.
name (str, default = None) – Name of the subdirectory inside path where model will be saved. The final model directory will be os.path.join(path, name) If None, defaults to the model’s class name: self.__class__.__name__
problem_type (str, default = None) – Type of prediction problem, i.e. is this a binary/multiclass classification or regression problem (options: ‘binary’, ‘multiclass’, ‘regression’). If None, will attempt to infer the problem type based on training data labels during training.
eval_metric (
autogluon.core.metrics.Scorer
or str, default = None) –Metric by which predictions will be ultimately evaluated on test data. This only impacts model.score(), as eval_metric is not used during training.
If eval_metric = None, it is automatically chosen based on problem_type. Defaults to ‘accuracy’ for binary and multiclass classification and ‘root_mean_squared_error’ for regression. Otherwise, options for classification:
[‘accuracy’, ‘balanced_accuracy’, ‘f1’, ‘f1_macro’, ‘f1_micro’, ‘f1_weighted’, ‘roc_auc’, ‘roc_auc_ovo_macro’, ‘average_precision’, ‘precision’, ‘precision_macro’, ‘precision_micro’, ‘precision_weighted’, ‘recall’, ‘recall_macro’, ‘recall_micro’, ‘recall_weighted’, ‘log_loss’, ‘pac_score’, ‘quadratic_kappa’]
- Options for regression:
[‘root_mean_squared_error’, ‘mean_squared_error’, ‘mean_absolute_error’, ‘median_absolute_error’, ‘r2’]
- Options for quantile regression:
[‘pinball_loss’]
For more information on these options, see sklearn.metrics: https://scikit-learn.org/stable/modules/classes.html#sklearn-metrics-metrics
You can also pass your own evaluation function here as long as it follows formatting of the functions defined in folder autogluon.core.metrics.
hyperparameters – Hyperparameters that will be used by the model (can be search spaces instead of fixed values). If None, model defaults are used. This is identical to passing an empty dictionary.
- can_compile(compiler_configs: dict | None = None) bool [source]¶
Verify whether the model can be compiled with the compiler configuration.
- Parameters:
compiler_configs (dict, default=None) – Model specific compiler options. This can be useful to specify the compiler backend for a specific model, e.g. {“RandomForest”: {“compiler”: “onnx”}}
- compile(compiler_configs: dict | None = None)[source]¶
Compile the trained model for faster inference.
NOTE: - The model is assumed to be fitted before compilation. - If save_in_pkl attribute of the compiler is False, self.model would be set to None.
- Parameters:
compiler_configs (dict, default=None) – Model specific compiler options. This can be useful to specify the compiler backend for a specific model, e.g. {“RandomForest”: {“compiler”: “onnx”}}
- compute_feature_importance(X: DataFrame, y: Series, features: List[str] | None = None, silent: bool = False, importance_as_list: bool = False, **kwargs) DataFrame [source]¶
Compute feature importance via permutation shuffling.
- Parameters:
X
y
features
silent
importance_as_list
kwargs
- Return type:
pd.DataFrame of feature importance
- convert_to_refit_full_template()[source]¶
After calling this function, returned model should be able to be fit without X_val, y_val using the iterations trained by the original model.
Increase max_memory_usage_ratio by 25% to reduce the chance that the refit model will trigger NotEnoughMemoryError and skip training. This can happen without the 25% increase since the refit model generally will use more training data and thus require more memory.
- convert_to_refit_full_via_copy()[source]¶
Creates a new refit_full variant of the model, but instead of training it simply copies self. This method is for compatibility with models that have not implemented refit_full support as a fallback.
- convert_to_template()[source]¶
After calling this function, returned model should be able to be fit as if it was new, as well as deep-copied. The model name and path will be identical to the original, and must be renamed prior to training to avoid overwriting the original model files if they exist.
- delete_from_disk(silent: bool = False)[source]¶
Deletes the model from disk.
WARNING: This will DELETE ALL FILES in the self.path directory, regardless if they were created by AutoGluon or not. DO NOT STORE FILES INSIDE OF THE MODEL DIRECTORY THAT ARE UNRELATED TO AUTOGLUON.
- estimate_memory_usage(**kwargs) int [source]¶
Estimates the memory usage of the model while training. :returns: int :rtype: number of bytes will be used during training
- fit(**kwargs)[source]¶
Fit model to predict values in y based on X.
Models should not override the fit method, but instead override the _fit method which has the same arguments.
- Parameters:
X (DataFrame) – The training data features.
y (Series) – The training data ground truth labels.
X_val (DataFrame, default = None) – The validation data features. If None, early stopping via validation score will be disabled.
y_val (Series, default = None) – The validation data ground truth labels. If None, early stopping via validation score will be disabled.
X_unlabeled (DataFrame, default = None) – Unlabeled data features. Models may optionally implement logic which leverages unlabeled data to improve model accuracy.
time_limit (float, default = None) – Time limit in seconds to adhere to when fitting model. Ideally, model should early stop during fit to avoid going over the time limit if specified.
sample_weight (Series, default = None) – The training data sample weights. Models may optionally leverage sample weights during fit. If None, model decides. Typically, models assume uniform sample weight.
sample_weight_val (Series, default = None) – The validation data sample weights. If None, model decides. Typically, models assume uniform sample weight.
num_cpus (int, default = 'auto') – How many CPUs to use during fit. This is counted in virtual cores, not in physical cores. If ‘auto’, model decides.
num_gpus (int, default = 'auto') – How many GPUs to use during fit. If ‘auto’, model decides.
feature_metadata (
autogluon.common.features.feature_metadata.FeatureMetadata
, default = None) – Contains feature type information that can be used to identify special features such as text ngrams and datetime as well as which features are numerical vs categorical. If None, feature_metadata is inferred during fit.verbosity (int, default = 2) – Verbosity levels range from 0 to 4 and control how much information is printed. Higher levels correspond to more detailed print statements (you can set verbosity = 0 to suppress warnings). verbosity 4: logs every training iteration, and logs the most detailed information. verbosity 3: logs training iterations periodically, and logs more detailed information. verbosity 2: logs only important information. verbosity 1: logs only warnings and exceptions. verbosity 0: logs only exceptions.
**kwargs – Any additional fit arguments a model supports.
- get_fit_metadata() dict [source]¶
Returns dictionary of metadata related to model fit that isn’t related to hyperparameters. Must be called after model has been fit.
- get_memory_size(allow_exception: bool = False) int | None [source]¶
Pickled the model object (self) and returns the size in bytes. Will raise an exception if self cannot be pickled.
Note: This will temporarily double the memory usage of the model, as both the original and the pickled version will exist in memory. This can lead to an out-of-memory error if the model is larger than the remaining available memory.
- Parameters:
allow_exception (bool, default = False) – If True and an exception occurs during the memory size calculation, will return None instead of raising the exception. For example, if a model failed during fit and had a messy internal state, and then get_memory_size was called, it may still contain a non-serializable object. By setting allow_exception=True, we avoid crashing in this scenario. For example: “AttributeError: Can’t pickle local object ‘func_generator.<locals>.custom_metric’”
- Returns:
memory_size – The memory size in bytes of the pickled model object. None if an exception occurred and allow_exception=True.
- Return type:
int | None
- get_minimum_resources(is_gpu_available: bool = False) Dict[str, int | float] [source]¶
- Parameters:
is_gpu_available (bool, default = False) – Whether gpu is available in the system. Model that can be trained both on cpu and gpu can decide the minimum resources based on this.
model. (Returns a dictionary of minimum resource requirements to fit the)
train. (Subclass should consider overriding this method if it requires more resources to)
dictionary (If a resource is not part of the output)
unnecessary. (it is considered)
keys (Valid)
- get_trained_params() dict [source]¶
Returns the hyperparameters of the trained model. If the model early stopped, this will contain the epoch/iteration the model uses during inference, instead of the epoch/iteration specified during fit. This is used for generating a model template to refit on all of the data (no validation set).
- hyperparameter_tune(hyperparameter_tune_kwargs='auto', hpo_executor: HpoExecutor | None = None, time_limit: float | None = None, **kwargs)[source]¶
Perform hyperparameter tuning of the model, fitting multiple variants of the model based on the search space provided in hyperparameters during init.
- Parameters:
hyperparameter_tune_kwargs (str or dict, default='auto') –
Hyperparameter tuning strategy and kwargs (for example, how many HPO trials to run). Valid keys:
’num_trials’: Number of hpo trials you want to perform. ‘scheduler’: Scheduler used by hpo experiment.
- Valid values:
’local’: Local FIFO scheduler. Sequential if Custom backend and parallel if Ray Tune backend.
- ’searcher’: Search algorithm used by hpo experiment.
- Valid values:
’auto’: Random search. ‘random’: Random search. ‘bayes’: Bayes Optimization. Only supported by Ray Tune backend.
- Valid preset values:
’auto’: Uses the ‘random’ preset. ‘random’: Performs HPO via random search using local scheduler.
The ‘searcher’ key is required when providing a dict.
hpo_executor (HpoExecutor, default None) – Executor to perform HPO experiment. This implements the interface for different HPO backends. For more info, please refer to HpoExecutor under core/hpo/executors.py
time_limit (float, default None) – In general, this is the time limit in seconds to run HPO for. In reality, this is the time limit in seconds budget to fully train all trials executed by HPO. For example, BaggedEnsemble will only use a fraction of the time limit during HPO because it needs the remaining time later to fit all of the folds of the trials.
**kwargs –
- Same kwargs you would pass to fit call, such as:
X y X_val y_val feature_metadata sample_weight sample_weight_val
- Returns:
Tuple of (hpo_results (Dict[str, dict], hpo_info: Any))
hpo_results (Dict[str, dict]) –
- A dictionary of trial model names to a dictionary containing:
- path: str
Absolute path to the trained model artifact. Used to load the model.
- val_score: float
val_score of the model
- trial: int
Trial number of the model, starting at 0.
- hyperparameters: dict
Hyperparameter config of the model trial.
hpo_info (Any) – Advanced output with scheduler specific logic, primarily for debugging. In case of Ray Tune backend, this will be an Analysis object: https://docs.ray.io/en/latest/tune/api/doc/ray.tune.ExperimentAnalysis.html
- is_initialized() bool [source]¶
Returns True if the model is initialized. This indicates whether the model has inferred various information such as problem_type and num_classes. A model is automatically initialized when .fit or .hyperparameter_tune are called.
- is_valid() bool [source]¶
Returns True if the model is capable of inference on new data (if normal model) or has produced out-of-fold predictions (if bagged model) This indicates whether the model can be used as a base model to fit a stack ensemble model.
- classmethod load(path: str, reset_paths: bool = True, verbose: bool = True)[source]¶
Loads the model from disk to memory.
- Parameters:
path (str) – Path to the saved model, minus the file name. This should generally be a directory path ending with a ‘/’ character (or appropriate path separator value depending on OS). The model file is typically located in os.path.join(path, cls.model_file_name).
reset_paths (bool, default True) – Whether to reset the self.path value of the loaded model to be equal to path. It is highly recommended to keep this value as True unless accessing the original self.path value is important. If False, the actual valid path and self.path may differ, leading to strange behaviour and potential exceptions if the model needs to load any other files at a later time.
verbose (bool, default True) – Whether to log the location of the loaded file.
- Returns:
model – Loaded model object.
- Return type:
cls
- predict(X, **kwargs) ndarray [source]¶
Returns class predictions of X. For binary and multiclass problems, this returns the predicted class labels as a 1d numpy array. For regression problems, this returns the predicted values as a 1d numpy array.
- predict_from_proba(y_pred_proba: ndarray) ndarray [source]¶
Convert prediction probabilities to predictions.
- Parameters:
y_pred_proba (np.ndarray) – The prediction probabilities to be converted to predictions.
- Returns:
y_pred – The predictions obtained from y_pred_proba.
- Return type:
np.ndarray
Examples
>>> y_pred = predictor.predict(X) >>> y_pred_proba = predictor.predict_proba(X) >>> >>> # Identical to y_pred >>> y_pred_from_proba = predictor.predict_from_proba(y_pred_proba)
- property predict_n_size: int | None¶
The number of rows in the data used when calculating self.predict_time.
- property predict_n_time_per_row: float | None¶
The time in seconds required to predict 1 row of data given a batch size of self.predict_n_size. Returns None if either self.predict_time or self.predict_n_size are None.
- predict_proba(X, *, normalize: bool | None = None, record_time: bool = False, **kwargs) ndarray [source]¶
Returns class prediction probabilities of X. For binary problems, this returns the positive class label probability as a 1d numpy array. For multiclass problems, this returns the class label probabilities of each class as a 2d numpy array. For regression problems, this returns the predicted values as a 1d numpy array.
- Parameters:
X – The data used for prediction.
normalize (bool | None, default = None) – Whether to normalize the predictions prior to returning. If None, will default to self.normalize_pred_probas.
record_time (bool, default = False) – If True, will record the time taken for prediction in self.predict_time and the number of rows of X in self.predict_n_size.
kwargs – Keyword arguments to pass into self._predict_proba.
- Returns:
y_pred_proba – The prediction probabilities
- Return type:
np.ndarray
- preprocess(X, preprocess_nonadaptive: bool = True, preprocess_stateful: bool = True, **kwargs)[source]¶
Preprocesses the input data into internal form ready for fitting or inference. It is not recommended to override this method, as it is closely tied to multi-layer stacking logic. Instead, override _preprocess.
- record_predict_info(X: DataFrame)[source]¶
Records the necessary information to compute self.predict_n_time_per_row.
- Parameters:
X (pd.DataFrame) – The data used to predict on when calculating self.predict_time.
- reduce_memory_size(remove_fit: bool = True, remove_info: bool = False, requires_save: bool = True, **kwargs)[source]¶
Removes non-essential objects from the model to reduce memory and disk footprint. If remove_fit=True, enables the removal of variables which are required for fitting the model. If the model is already fully trained, then it is safe to remove these. If remove_info=True, enables the removal of variables which are used during model.get_info(). The values will be None when calling model.get_info(). If requires_save=True, enables the removal of variables which are part of the model.pkl object, requiring an overwrite of the model to disk if it was previously persisted.
It is not necessary for models to implement this.
- save(path: str | None = None, verbose: bool = True) str [source]¶
Saves the model to disk.
- Parameters:
path (str, default None) – Path to the saved model, minus the file name. This should generally be a directory path ending with a ‘/’ character (or appropriate path separator value depending on OS). If None, self.path is used. The final model file is typically saved to os.path.join(path, self.model_file_name).
verbose (bool, default True) – Whether to log the location of the saved file.
- Returns:
path – Path to the saved model, minus the file name. Use this value to load the model from disk via cls.load(path), cls being the class of the model object, such as model = RFModel.load(path)
- Return type:
str
LGBModel¶
- class autogluon.tabular.models.LGBModel(**kwargs)[source]¶
LightGBM model: https://lightgbm.readthedocs.io/en/latest/
Hyperparameter options: https://lightgbm.readthedocs.io/en/latest/Parameters.html
- Extra hyperparameter options:
ag.early_stop : int, specifies the early stopping rounds. Defaults to an adaptive strategy. Recommended to keep default.
CatBoostModel¶
- class autogluon.tabular.models.CatBoostModel(**kwargs)[source]¶
CatBoost model: https://catboost.ai/
Hyperparameter options: https://catboost.ai/en/docs/references/training-parameters
XGBoostModel¶
- class autogluon.tabular.models.XGBoostModel(**kwargs)[source]¶
XGBoost model: https://xgboost.readthedocs.io/en/latest/
Hyperparameter options: https://xgboost.readthedocs.io/en/latest/parameter.html
RFModel¶
- class autogluon.tabular.models.RFModel(**kwargs)[source]¶
Random Forest model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html
XTModel¶
- class autogluon.tabular.models.XTModel(**kwargs)[source]¶
Extra Trees model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.ExtraTreesClassifier.html#sklearn.ensemble.ExtraTreesClassifier
KNNModel¶
- class autogluon.tabular.models.KNNModel(**kwargs)[source]¶
KNearestNeighbors model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html
LinearModel¶
- class autogluon.tabular.models.LinearModel(**kwargs)[source]¶
Linear model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html
Model backend differs depending on problem_type:
TabularNeuralNetTorchModel¶
NNFastAiTabularModel¶
- class autogluon.tabular.models.NNFastAiTabularModel(**kwargs)[source]¶
Class for fastai v1 neural network models that operate on tabular data.
- Hyperparameters:
‘y_scaler’: on regression problems, the model can give unreasonable predictions on unseen data. To address this problem, AutoGluon scales y values by default for regression problems. This attribute allows to pass a custom scaler for y values. Please note that intermediate iteration metrics will be affected by this transform and as a result intermediate iteration scores will be different from the final ones (these will be correct). https://scikit-learn.org/stable/modules/classes.html#module-sklearn.preprocessing
‘clipping’: on regression problems, extreme outliers of y can hurt performance of the model during training and on unseen data. To address this problem, AutoGluon clips input y values and output predictions by default to a range inferred from the training data. Setting this attribute to False disables clipping.
‘layers’: list of hidden layers sizes; None - use model’s heuristics; default is None
‘emb_drop’: embedding layers dropout; default is 0.1
‘ps’: linear layers dropout - list of values applied to every layer in layers; default is [0.1]
‘bs’: batch size; default is 256
‘lr’: maximum learning rate for one cycle policy; default is 1e-2; see also https://docs.fast.ai/callback.schedule.html#Learner.fit_one_cycle, One-cycle policy paper: https://arxiv.org/abs/1803.09820
‘epochs’: number of epochs; default is 30
# Early stopping settings. See more details here: https://docs.fast.ai/callback.tracker.html#EarlyStoppingCallback ‘early.stopping.min_delta’: 0.0001, ‘early.stopping.patience’: 10,
VowpalWabbitModel¶
- class autogluon.tabular.models.VowpalWabbitModel(**kwargs)[source]¶
VowpalWabbit Model: https://vowpalwabbit.org/
VowpalWabbit Command Line args: https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Command-line-arguments
MultiModalPredictorModel¶
TextPredictorModel¶
ImagePredictorModel¶
- class autogluon.tabular.models.ImagePredictorModel(**kwargs)[source]¶
MultimodalPredictor that only uses image features. Currently only supports 1 image column, with 1 image per sample. Additionally has special null image handling to improve performance in the presence of null images (aka image path of ‘’)
Note: null handling has not been compared to the built-in null handling of MultimodalPredictor yet.
Ensemble Models¶
Bagged ensemble meta-model which fits a given model multiple times across different splits of the training data. |
|
Stack ensemble meta-model which functions identically to |
|
Weighted ensemble meta-model that implements Ensemble Selection: https://www.cs.cornell.edu/~alexn/papers/shotgun.icml04.revised.rev2.pdf |
BaggedEnsembleModel¶
- class autogluon.core.models.BaggedEnsembleModel(model_base: AbstractModel | Type[AbstractModel], model_base_kwargs: Dict[str, any] | None = None, random_state: int = 0, **kwargs)[source]¶
Bagged ensemble meta-model which fits a given model multiple times across different splits of the training data.
For certain child models such as KNN, this may only train a single model and instead rely on the child model to generate out-of-fold predictions.
- Parameters:
model_base (Union[AbstractModel, Type[AbstractModel]]) – The base model to repeatedly fit during bagging. If a AbstractModel class, then also provide model_base_kwargs which will be used to initialize the model via model_base(**model_base_kwargs).
model_base_kwargs (Dict[str, any], default = None) – kwargs used to initialize model_base if model_base is a class.
random_state (int, default = 0) – Random state used to split the data into cross-validation folds during fit.
**kwargs – Refer to AbstractModel documentation
StackerEnsembleModel¶
- class autogluon.core.models.StackerEnsembleModel(base_model_names=None, base_models_dict=None, base_model_paths_dict=None, base_model_types_dict=None, base_model_types_inner_dict=None, base_model_performances_dict=None, **kwargs)[source]¶
Stack ensemble meta-model which functions identically to
BaggedEnsembleModel
with the additional capability to leverage base models.By specifying base models during init, stacker models can use the base model predictions as features during training and inference.
This property allows for significantly improved model quality in many situations compared to non-stacking alternatives.
Stacker models can act as base models to other stacker models, enabling multi-layer stack ensembling.
WeightedEnsembleModel¶
- class autogluon.core.models.WeightedEnsembleModel(**kwargs)[source]¶
Weighted ensemble meta-model that implements Ensemble Selection: https://www.cs.cornell.edu/~alexn/papers/shotgun.icml04.revised.rev2.pdf
A
autogluon.core.models.GreedyWeightedEnsembleModel
must be specified as the model_base to properly function.
Experimental Models¶
AutoGluon model wrapper to the TabPFN model: https://github.com/automl/TabPFN |
|
FTTransformerModel¶
TabPFNModel¶
- class autogluon.tabular.models.TabPFNModel(**kwargs)[source]¶
AutoGluon model wrapper to the TabPFN model: https://github.com/automl/TabPFN
Paper: “TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second” Authors: Noah Hollmann, Samuel Müller, Katharina Eggensperger, and Frank Hutter
TabPFN is a viable model option when inference speed is not a concern, and the number of rows of training data is less than 10,000.
Additionally, TabPFN is only available for classification tasks with up to 10 classes and 100 features.
To use this model, tabpfn must be installed. To install TabPFN, you can run pip install autogluon.tabular[tabpfn] or pip install tabpfn.