Interpretable rule-based modeling¶
Note: This addition was made through collaboration with the Yu Group of Statistics and EECS from UC Berkeley.
Tip: Prior to reading this tutorial, it is recommended to have a basic understanding of the TabularPredictor API covered in Predicting Columns in a Table - Quick Start.
In this tutorial, we will explain how to automatically use interpretable models powered by integration with 🔍 the imodels package. This allows for automatically learning models based on rules which are extremely concise and can be useful for (1) understanding data or (2) building a transparent predictive model.
Note: imodels
must be installed for this tutorial. You can ensure
imodels
is installed via pip install autogluon.tabular[imodels]
.
imodels
is not installed by default.
Begin by loading in data to predict. Note: interpretable rule-based modeling is currently only supported for binary classification.
from autogluon.tabular import TabularDataset, TabularPredictor
train_data = TabularDataset('https://autogluon.s3.amazonaws.com/datasets/Inc/train.csv')
subsample_size = 500 # subsample subset of data for faster demo, try setting this to much larger values
train_data = train_data.sample(n=subsample_size, random_state=0)
train_data.head()
age | workclass | fnlwgt | education | education-num | marital-status | occupation | relationship | race | sex | capital-gain | capital-loss | hours-per-week | native-country | class | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6118 | 51 | Private | 39264 | Some-college | 10 | Married-civ-spouse | Exec-managerial | Wife | White | Female | 0 | 0 | 40 | United-States | >50K |
23204 | 58 | Private | 51662 | 10th | 6 | Married-civ-spouse | Other-service | Wife | White | Female | 0 | 0 | 8 | United-States | <=50K |
29590 | 40 | Private | 326310 | Some-college | 10 | Married-civ-spouse | Craft-repair | Husband | White | Male | 0 | 0 | 44 | United-States | <=50K |
18116 | 37 | Private | 222450 | HS-grad | 9 | Never-married | Sales | Not-in-family | White | Male | 0 | 2339 | 40 | El-Salvador | <=50K |
33964 | 62 | Private | 109190 | Bachelors | 13 | Married-civ-spouse | Exec-managerial | Husband | White | Male | 15024 | 0 | 40 | United-States | >50K |
Now, we create a predictor and fit it to the data. By specifying
presets='interpretable'
, we tell the predictor to fit only
interpretable models.
predictor = TabularPredictor(label='class')
predictor.fit(train_data, presets='interpretable')
predictor.leaderboard()
No path specified. Models will be saved in: "AutogluonModels/ag-20230222_232840/"
Presets specified: ['interpretable']
Beginning AutoGluon training ...
AutoGluon will save models to "AutogluonModels/ag-20230222_232840/"
AutoGluon Version: 0.7.0b20230222
Python Version: 3.8.13
Operating System: Linux
Platform Machine: x86_64
Platform Version: #1 SMP Tue Nov 30 00:17:50 UTC 2021
Train Data Rows: 500
Train Data Columns: 14
Label Column: class
Preprocessing data ...
AutoGluon infers your prediction problem is: 'binary' (because only two unique label-values observed).
2 unique label values: [' >50K', ' <=50K']
If 'binary' is not the correct problem_type, please manually specify the problem_type parameter during predictor init (You may specify problem_type as one of: ['binary', 'multiclass', 'regression'])
Selected class <--> label mapping: class 1 = >50K, class 0 = <=50K
Note: For your binary classification, AutoGluon arbitrarily selected which label-value represents positive ( >50K) vs negative ( <=50K) class.
To explicitly set the positive_class, either rename classes to 1 and 0, or specify positive_class in Predictor init.
Using Feature Generators to preprocess the data ...
Fitting AutoMLPipelineFeatureGenerator...
Available Memory: 31493.25 MB
Train Data (Original) Memory Usage: 0.29 MB (0.0% of available memory)
Inferring data type of each feature based on column values. Set feature_metadata_in to manually specify special dtypes of the features.
Stage 1 Generators:
Fitting AsTypeFeatureGenerator...
Note: Converting 1 features to boolean dtype as they only contain 2 unique values.
Stage 2 Generators:
Fitting FillNaFeatureGenerator...
Stage 3 Generators:
Fitting IdentityFeatureGenerator...
Fitting CategoryFeatureGenerator...
Fitting CategoryMemoryMinimizeFeatureGenerator...
Stage 4 Generators:
Fitting DropUniqueFeatureGenerator...
Types of features in original data (raw dtype, special dtypes):
('int', []) : 6 | ['age', 'fnlwgt', 'education-num', 'capital-gain', 'capital-loss', ...]
('object', []) : 8 | ['workclass', 'education', 'marital-status', 'occupation', 'relationship', ...]
Types of features in processed data (raw dtype, special dtypes):
('category', []) : 7 | ['workclass', 'education', 'marital-status', 'occupation', 'relationship', ...]
('int', []) : 6 | ['age', 'fnlwgt', 'education-num', 'capital-gain', 'capital-loss', ...]
('int', ['bool']) : 1 | ['sex']
0.1s = Fit runtime
14 features in original data used to generate 14 features in processed data.
Train Data (Processed) Memory Usage: 0.03 MB (0.0% of available memory)
Data preprocessing and feature engineering runtime = 0.09s ...
AutoGluon will gauge predictive performance using evaluation metric: 'accuracy'
To change this, specify the eval_metric parameter of Predictor()
Automatically generating train/validation split with holdout_frac=0.2, Train Rows: 400, Val Rows: 100
Fitting 12 L1 models ...
Fitting model: RuleFit ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.73 = Validation score (accuracy)
2.39s = Training runtime
0.04s = Validation runtime
Fitting model: RuleFit_2 ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.73 = Validation score (accuracy)
2.07s = Training runtime
0.07s = Validation runtime
Fitting model: RuleFit_3 ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.77 = Validation score (accuracy)
2.14s = Training runtime
0.08s = Validation runtime
Fitting model: GreedyTree ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but GreedyTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.81 = Validation score (accuracy)
0.72s = Training runtime
0.02s = Validation runtime
Fitting model: BoostedRules ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but BoostedRulesClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.83 = Validation score (accuracy)
0.64s = Training runtime
0.02s = Validation runtime
Fitting model: BoostedRules_2 ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but BoostedRulesClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.81 = Validation score (accuracy)
0.64s = Training runtime
0.02s = Validation runtime
Fitting model: Figs ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.27 = Validation score (accuracy)
0.65s = Training runtime
0.02s = Validation runtime
Fitting model: Figs_2 ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.27 = Validation score (accuracy)
0.67s = Training runtime
0.02s = Validation runtime
Fitting model: Figs_3 ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.27 = Validation score (accuracy)
0.69s = Training runtime
0.02s = Validation runtime
Fitting model: HierarchicalShrinkageTree ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.82 = Validation score (accuracy)
1.04s = Training runtime
0.02s = Validation runtime
Fitting model: HierarchicalShrinkageTree_2 ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.82 = Validation score (accuracy)
1.04s = Training runtime
0.02s = Validation runtime
Fitting model: HierarchicalShrinkageTree_3 ...
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but DecisionTreeClassifier was fitted without feature names
warnings.warn(
/home/ci/opt/venv/lib/python3.8/site-packages/sklearn/utils/validation.py:758: UserWarning: pandas.DataFrame with sparse columns found.It will be converted to a dense numpy array.
warnings.warn(
0.82 = Validation score (accuracy)
1.04s = Training runtime
0.02s = Validation runtime
Fitting model: WeightedEnsemble_L2 ...
0.83 = Validation score (accuracy)
0.26s = Training runtime
0.0s = Validation runtime
AutoGluon training complete, total runtime = 15.13s ... Best model: "WeightedEnsemble_L2"
TabularPredictor saved. To load, use: predictor = TabularPredictor.load("AutogluonModels/ag-20230222_232840/")
model score_val pred_time_val fit_time pred_time_val_marginal fit_time_marginal stack_level can_infer fit_order
0 BoostedRules 0.83 0.018178 0.635922 0.018178 0.635922 1 True 5
1 WeightedEnsemble_L2 0.83 0.018721 0.896239 0.000542 0.260318 2 True 13
2 HierarchicalShrinkageTree_2 0.82 0.017990 1.044418 0.017990 1.044418 1 True 11
3 HierarchicalShrinkageTree 0.82 0.018742 1.035892 0.018742 1.035892 1 True 10
4 HierarchicalShrinkageTree_3 0.82 0.021276 1.044300 0.021276 1.044300 1 True 12
5 GreedyTree 0.81 0.018385 0.719430 0.018385 0.719430 1 True 4
6 BoostedRules_2 0.81 0.018939 0.643160 0.018939 0.643160 1 True 6
7 RuleFit_3 0.77 0.079182 2.140148 0.079182 2.140148 1 True 3
8 RuleFit 0.73 0.044107 2.389099 0.044107 2.389099 1 True 1
9 RuleFit_2 0.73 0.070148 2.072358 0.070148 2.072358 1 True 2
10 Figs 0.27 0.017628 0.648369 0.017628 0.648369 1 True 7
11 Figs_2 0.27 0.017874 0.671452 0.017874 0.671452 1 True 8
12 Figs_3 0.27 0.018246 0.692464 0.018246 0.692464 1 True 9
model | score_val | pred_time_val | fit_time | pred_time_val_marginal | fit_time_marginal | stack_level | can_infer | fit_order | |
---|---|---|---|---|---|---|---|---|---|
0 | BoostedRules | 0.83 | 0.018178 | 0.635922 | 0.018178 | 0.635922 | 1 | True | 5 |
1 | WeightedEnsemble_L2 | 0.83 | 0.018721 | 0.896239 | 0.000542 | 0.260318 | 2 | True | 13 |
2 | HierarchicalShrinkageTree_2 | 0.82 | 0.017990 | 1.044418 | 0.017990 | 1.044418 | 1 | True | 11 |
3 | HierarchicalShrinkageTree | 0.82 | 0.018742 | 1.035892 | 0.018742 | 1.035892 | 1 | True | 10 |
4 | HierarchicalShrinkageTree_3 | 0.82 | 0.021276 | 1.044300 | 0.021276 | 1.044300 | 1 | True | 12 |
5 | GreedyTree | 0.81 | 0.018385 | 0.719430 | 0.018385 | 0.719430 | 1 | True | 4 |
6 | BoostedRules_2 | 0.81 | 0.018939 | 0.643160 | 0.018939 | 0.643160 | 1 | True | 6 |
7 | RuleFit_3 | 0.77 | 0.079182 | 2.140148 | 0.079182 | 2.140148 | 1 | True | 3 |
8 | RuleFit | 0.73 | 0.044107 | 2.389099 | 0.044107 | 2.389099 | 1 | True | 1 |
9 | RuleFit_2 | 0.73 | 0.070148 | 2.072358 | 0.070148 | 2.072358 | 1 | True | 2 |
10 | Figs | 0.27 | 0.017628 | 0.648369 | 0.017628 | 0.648369 | 1 | True | 7 |
11 | Figs_2 | 0.27 | 0.017874 | 0.671452 | 0.017874 | 0.671452 | 1 | True | 8 |
12 | Figs_3 | 0.27 | 0.018246 | 0.692464 | 0.018246 | 0.692464 | 1 | True | 9 |
The rule-based models take slightly different forms (see below), but all try to optimize predictive performance using as few rules as possible. See the imodels package for more details.
Specifically, the interpretable preset fits different hyperparameter configurations of 5 models types: 1. Greedy CART decision tree - returns a tree learned via greedy optimization (Description, Paper) 2. Hierarchical Shrinkage tree - returns regularized version of CART decision tree (Description, Paper) 3. Fast interpretable greedy-tree sum - returns a sum of trees, which are greedily grown simultaneously (Description, Paper) 4. RuleFit - returns a set of weighted rules, which are learned by a sparse linear model on rules extracted from decision trees (Description, Paper) 5. Boosted rule set - returns a set of rules, which are learned sequentially via AdaBoost (Description, Paper)
In addition to the usual functions in TabularPredictor
, this
predictor fitted with interpretable models has some additional
functionality. For example, we can now inspect the complexity of the
fitted models (i.e. how many rules they contain).
predictor.interpretable_models_summary()
model_types | model_performance | complexity | model_best | model_paths | model_fit_times | model_pred_times | num_bag_folds | max_stack_level | num_classes | model_hyperparams | |
---|---|---|---|---|---|---|---|---|---|---|---|
BoostedRules | BoostedRulesModel | 0.83 | 5.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Boos... | 0.635922 | 0.018178 | 0 | 2 | 2 | {'random_state': 0, 'n_estimators': 5} |
HierarchicalShrinkageTree | HSTreeModel | 0.82 | 19.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Hier... | 1.035892 | 0.018742 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 6} |
HierarchicalShrinkageTree_2 | HSTreeModel | 0.82 | 19.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Hier... | 1.044418 | 0.017990 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 12} |
HierarchicalShrinkageTree_3 | HSTreeModel | 0.82 | 19.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Hier... | 1.044300 | 0.021276 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 18} |
BoostedRules_2 | BoostedRulesModel | 0.81 | 10.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Boos... | 0.643160 | 0.018939 | 0 | 2 | 2 | {'random_state': 0, 'n_estimators': 10} |
GreedyTree | GreedyTreeModel | 0.81 | 17.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Gree... | 0.719430 | 0.018385 | 0 | 2 | 2 | {'random_state': 0, 'max_leaf_nodes': 18} |
RuleFit_3 | RuleFitModel | 0.77 | 35.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Rule... | 2.140148 | 0.079182 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 18} |
RuleFit | RuleFitModel | 0.73 | 8.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Rule... | 2.389099 | 0.044107 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 7} |
RuleFit_2 | RuleFitModel | 0.73 | 29.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Rule... | 2.072358 | 0.070148 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 12} |
Figs | FigsModel | 0.27 | 6.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Figs/ | 0.648369 | 0.017628 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 6} |
Figs_2 | FigsModel | 0.27 | 10.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Figs_2/ | 0.671452 | 0.017874 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 10} |
Figs_3 | FigsModel | 0.27 | 15.0 | WeightedEnsemble_L2 | AutogluonModels/ag-20230222_232840/models/Figs_3/ | 0.692464 | 0.018246 | 0 | 2 | 2 | {'random_state': 0, 'max_rules': 15} |
We can also explicitly inspect the rules of the best-performing model.
predictor.print_interpretable_rules() # can optionally specify a model name or complexity threshold
BoostedRulesClassifier(n_estimators=5, random_state=0)
In some cases, these rules are sufficient to accurately make predictions. In other cases, they may just be used to gain a better understanding of the data before proceeding with more black-box models.