Note
Go to the end to download the full example code.
SKD016 - Estimator not tuned#
This example walks through mitigations when check SKD016 tips on a plain estimator left at scikit-learn defaults. The check compares initialization parameters against a curated table of high-impact hyperparameters and suggests axes worth tuning.
Mitigations from the Automated checks user guide:
wrap the estimator in
GridSearchCVorRandomizedSearchCVover the suggested parameters,or set sensible non-default values manually.
We use the employee salaries dataset (above-median salary as the positive
class) with a default tabular_pipeline() classifier. The goal is
to move off factory defaults either through search or hand-picked values.
Load the employee salaries dataset#
Mixed HR features suit tabular_pipeline. A default
tabular_pipeline("classifier") leaves
HistGradientBoostingClassifier at sklearn
defaults — the setup SKD016 is designed to flag.
from skrub.datasets import fetch_employee_salaries
dataset = fetch_employee_salaries()
X = dataset.X
y_salary = dataset.y.squeeze()
y = (y_salary > y_salary.median()).astype(int).rename("high_earner")
Inspect inputs and the binary target with TableReport.
from skrub import TableReport
TableReport(X)
| gender | department | department_name | division | assignment_category | employee_position_title | date_first_hired | year_first_hired | |
|---|---|---|---|---|---|---|---|---|
| 0 | F | POL | Department of Police | MSB Information Mgmt and Tech Division Records Management Section | Fulltime-Regular | Office Services Coordinator | 09/22/1986 | 1,986 |
| 1 | M | POL | Department of Police | ISB Major Crimes Division Fugitive Section | Fulltime-Regular | Master Police Officer | 09/12/1988 | 1,988 |
| 2 | F | HHS | Department of Health and Human Services | Adult Protective and Case Management Services | Fulltime-Regular | Social Worker IV | 11/19/1989 | 1,989 |
| 3 | M | COR | Correction and Rehabilitation | PRRS Facility and Security | Fulltime-Regular | Resident Supervisor II | 05/05/2014 | 2,014 |
| 4 | M | HCA | Department of Housing and Community Affairs | Affordable Housing Programs | Fulltime-Regular | Planning Specialist III | 03/05/2007 | 2,007 |
| 9,223 | F | HHS | Department of Health and Human Services | School Based Health Centers | Fulltime-Regular | Community Health Nurse II | 11/03/2015 | 2,015 |
| 9,224 | F | FRS | Fire and Rescue Services | Human Resources Division | Fulltime-Regular | Fire/Rescue Division Chief | 11/28/1988 | 1,988 |
| 9,225 | M | HHS | Department of Health and Human Services | Child and Adolescent Mental Health Clinic Services | Parttime-Regular | Medical Doctor IV - Psychiatrist | 04/30/2001 | 2,001 |
| 9,226 | M | CCL | County Council | Council Central Staff | Fulltime-Regular | Manager II | 09/05/2006 | 2,006 |
| 9,227 | M | DLC | Department of Liquor Control | Licensure, Regulation and Education | Fulltime-Regular | Alcohol/Tobacco Enforcement Specialist II | 01/30/2012 | 2,012 |
gender
ObjectDType- Null values
- 17 (0.2%)
- Unique values
- 2 (< 0.1%)
Most frequent values
M
F
['M', 'F']
department
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
Most frequent values
POL
HHS
FRS
DOT
COR
DLC
DGS
LIB
DPS
SHF
['POL', 'HHS', 'FRS', 'DOT', 'COR', 'DLC', 'DGS', 'LIB', 'DPS', 'SHF']
department_name
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
Most frequent values
Department of Police
Department of Health and Human Services
Fire and Rescue Services
Department of Transportation
Correction and Rehabilitation
Department of Liquor Control
Department of General Services
Department of Public Libraries
Department of Permitting Services
Sheriff's Office
['Department of Police', 'Department of Health and Human Services', 'Fire and Rescue Services', 'Department of Transportation', 'Correction and Rehabilitation', 'Department of Liquor Control', 'Department of General Services', 'Department of Public Libraries', 'Department of Permitting Services', "Sheriff's Office"]
division
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
Most frequent values
School Health Services
Transit Silver Spring Ride On
Transit Gaithersburg Ride On
Highway Services
Child Welfare Services
FSB Traffic Division School Safety Section
Income Supports
PSB 3rd District Patrol
PSB 4th District Patrol
List:Transit Nicholson Ride On
['School Health Services', 'Transit Silver Spring Ride On', 'Transit Gaithersburg Ride On', 'Highway Services', 'Child Welfare Services', 'FSB Traffic Division School Safety Section', 'Income Supports', 'PSB 3rd District Patrol', 'PSB 4th District Patrol', 'Transit Nicholson Ride On']
assignment_category
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
Most frequent values
Fulltime-Regular
Parttime-Regular
['Fulltime-Regular', 'Parttime-Regular']
employee_position_title
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
Most frequent values
Bus Operator
Police Officer III
Firefighter/Rescuer III
Manager III
Firefighter/Rescuer II
Master Firefighter/Rescuer
Office Services Coordinator
School Health Room Technician I
Police Officer II
List:Community Health Nurse II
['Bus Operator', 'Police Officer III', 'Firefighter/Rescuer III', 'Manager III', 'Firefighter/Rescuer II', 'Master Firefighter/Rescuer', 'Office Services Coordinator', 'School Health Room Technician I', 'Police Officer II', 'Community Health Nurse II']
date_first_hired
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
Most frequent values
12/12/2016
01/14/2013
02/24/2014
03/10/2014
08/12/2013
10/06/2014
09/22/2014
03/19/2007
07/16/2012
List:07/29/2013
['12/12/2016', '01/14/2013', '02/24/2014', '03/10/2014', '08/12/2013', '10/06/2014', '09/22/2014', '03/19/2007', '07/16/2012', '07/29/2013']
year_first_hired
Int64DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2,005 ± 14
- Min | Max
- 1,965 | 2,016
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
|
Column
|
Column name
|
dtype
|
Is sorted
|
Null values
|
Unique values
|
Mean
|
Std
|
Min
|
Median
|
Max
|
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | gender | ObjectDType | False | 17 (0.2%) | 2 (< 0.1%) | |||||
| 1 | department | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 2 | department_name | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 3 | division | ObjectDType | False | 0 (0.0%) | 694 (7.5%) | |||||
| 4 | assignment_category | ObjectDType | False | 0 (0.0%) | 2 (< 0.1%) | |||||
| 5 | employee_position_title | ObjectDType | False | 0 (0.0%) | 443 (4.8%) | |||||
| 6 | date_first_hired | ObjectDType | False | 0 (0.0%) | 2264 (24.5%) | |||||
| 7 | year_first_hired | Int64DType | False | 0 (0.0%) | 51 (0.6%) | 2.00e+03 | 9.33 | 1,965 | 2,005 | 2,016 |
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
gender
ObjectDType- Null values
- 17 (0.2%)
- Unique values
- 2 (< 0.1%)
Most frequent values
M
F
['M', 'F']
department
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
Most frequent values
POL
HHS
FRS
DOT
COR
DLC
DGS
LIB
DPS
SHF
['POL', 'HHS', 'FRS', 'DOT', 'COR', 'DLC', 'DGS', 'LIB', 'DPS', 'SHF']
department_name
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
Most frequent values
Department of Police
Department of Health and Human Services
Fire and Rescue Services
Department of Transportation
Correction and Rehabilitation
Department of Liquor Control
Department of General Services
Department of Public Libraries
Department of Permitting Services
Sheriff's Office
['Department of Police', 'Department of Health and Human Services', 'Fire and Rescue Services', 'Department of Transportation', 'Correction and Rehabilitation', 'Department of Liquor Control', 'Department of General Services', 'Department of Public Libraries', 'Department of Permitting Services', "Sheriff's Office"]
division
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
Most frequent values
School Health Services
Transit Silver Spring Ride On
Transit Gaithersburg Ride On
Highway Services
Child Welfare Services
FSB Traffic Division School Safety Section
Income Supports
PSB 3rd District Patrol
PSB 4th District Patrol
List:Transit Nicholson Ride On
['School Health Services', 'Transit Silver Spring Ride On', 'Transit Gaithersburg Ride On', 'Highway Services', 'Child Welfare Services', 'FSB Traffic Division School Safety Section', 'Income Supports', 'PSB 3rd District Patrol', 'PSB 4th District Patrol', 'Transit Nicholson Ride On']
assignment_category
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
Most frequent values
Fulltime-Regular
Parttime-Regular
['Fulltime-Regular', 'Parttime-Regular']
employee_position_title
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
Most frequent values
Bus Operator
Police Officer III
Firefighter/Rescuer III
Manager III
Firefighter/Rescuer II
Master Firefighter/Rescuer
Office Services Coordinator
School Health Room Technician I
Police Officer II
List:Community Health Nurse II
['Bus Operator', 'Police Officer III', 'Firefighter/Rescuer III', 'Manager III', 'Firefighter/Rescuer II', 'Master Firefighter/Rescuer', 'Office Services Coordinator', 'School Health Room Technician I', 'Police Officer II', 'Community Health Nurse II']
date_first_hired
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
Most frequent values
12/12/2016
01/14/2013
02/24/2014
03/10/2014
08/12/2013
10/06/2014
09/22/2014
03/19/2007
07/16/2012
List:07/29/2013
['12/12/2016', '01/14/2013', '02/24/2014', '03/10/2014', '08/12/2013', '10/06/2014', '09/22/2014', '03/19/2007', '07/16/2012', '07/29/2013']
year_first_hired
Int64DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2,005 ± 14
- Min | Max
- 1,965 | 2,016
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
| Column 1 | Column 2 | Cramér's V | Pearson's Correlation |
|---|---|---|---|
| department | department_name | 1.00 | |
| division | assignment_category | 0.593 | |
| assignment_category | employee_position_title | 0.497 | |
| department_name | assignment_category | 0.422 | |
| department | assignment_category | 0.422 | |
| department | employee_position_title | 0.413 | |
| department_name | employee_position_title | 0.413 | |
| division | employee_position_title | 0.410 | |
| department | division | 0.381 | |
| department_name | division | 0.381 | |
| gender | department | 0.380 | |
| gender | department_name | 0.380 | |
| gender | assignment_category | 0.294 | |
| gender | employee_position_title | 0.275 | |
| gender | division | 0.265 | |
| employee_position_title | date_first_hired | 0.179 | |
| date_first_hired | year_first_hired | 0.151 | |
| department | date_first_hired | 0.150 | |
| department_name | date_first_hired | 0.150 | |
| employee_position_title | year_first_hired | 0.131 | |
| gender | date_first_hired | 0.104 | |
| division | year_first_hired | 0.0862 | |
| department | year_first_hired | 0.0811 | |
| department_name | year_first_hired | 0.0811 | |
| assignment_category | date_first_hired | 0.0756 | |
| division | date_first_hired | 0.0728 | |
| gender | year_first_hired | 0.0641 | |
| assignment_category | year_first_hired | 0.0519 |
Please enable javascript
The skrub table reports need javascript to display correctly. If you are displaying a report in a Jupyter notebook and you see this message, you may need to re-execute the cell or to trust the notebook (button on the top right or "File > Trust notebook").
| high_earner | |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 1 |
| 3 | 0 |
| 4 | 1 |
| 9,223 | 1 |
| 9,224 | 1 |
| 9,225 | 1 |
| 9,226 | 1 |
| 9,227 | 1 |
high_earner
Int64DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.500 ± 0.500
- Median ± IQR
- 0 ± 1
- Min | Max
- 0 | 1
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
|
Column
|
Column name
|
dtype
|
Is sorted
|
Null values
|
Unique values
|
Mean
|
Std
|
Min
|
Median
|
Max
|
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | high_earner | Int64DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.500 | 0.500 | 0 | 0 | 1 |
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
high_earner
Int64DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.500 ± 0.500
- Median ± IQR
- 0 ± 1
- Min | Max
- 0 | 1
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
Please enable javascript
The skrub table reports need javascript to display correctly. If you are displaying a report in a Jupyter notebook and you see this message, you may need to re-execute the cell or to trust the notebook (button on the top right or "File > Trust notebook").
We use the same stratified split for every comparison.
from skore import TrainTestSplit
splitter = TrainTestSplit(test_size=0.2, random_state=42, stratify=y)
Trigger SKD016 - untuned default pipeline#
Defaults are fine for a first look at the table, but they are not a production configuration. SKD016 names the high-impact axes that usually matter first for this estimator family.
import skore
from skrub import tabular_pipeline
report = skore.evaluate(
tabular_pipeline("classifier"),
X=X,
y=y,
pos_label=1,
splitter=splitter,
)
report
| Metric | HistGradientBoostingClassifier |
|---|---|
| Accuracy | 0.937161 |
| Precision | 0.938111 |
| Recall | 0.936078 |
| ROC AUC | 0.987118 |
| Log loss | 0.146457 |
| Brier score | 0.044194 |
| Fit time (s) | 2.044371 |
| Predict time (s) | 0.284502 |
- [SKD008] Highly correlated input features. 3 pair(s) of features have a Spearman correlation above 0.9. Highly correlated features can destabilize linear model coefficients and feature-importance estimates, and may cause collinearity-induced numerical issues.Dropping redundant features may also improve model performance.
- [SKD016] Estimator not tuned. Estimator(s) left at default settings; consider tuning: ['learning_rate', 'max_leaf_nodes'] for HistGradientBoostingClassifier.
- [SKD003] Inconsistent performance across splits. Not applicable to estimator reports.
- [SKD005] Underrepresented classes. ML task is not multiclass classification. Got binary-classification.
- [SKD006] Coefficient interpretation. Estimator is not a linear model: it does not have a `coef_` attribute.
- [SKD007] MDI biased for high-cardinality features. Estimator is not a tree-based model: it does not have a `feature_importances_` attribute.
- [SKD013] Train-test overlap in time series. No datetime column found.
- [SKD014] Hyperparameters at search edge. Estimator is not a BaseSearchCV instance. Got Pipeline.
- [SKD015] Hyperparameters worth tuning. Estimator is not a BaseSearchCV instance. Got Pipeline.
No checks were muted.
Fast mode is on: expensive checks are skipped unless already cached.
Mute a check by passing its code to ignore, e.g. .checks.summarize(ignore=['SKD001']).
Pipeline(steps=[('tablevectorizer',
TableVectorizer(low_cardinality=ToCategorical())),
('histgradientboostingclassifier',
HistGradientBoostingClassifier())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Fitted attributes
Parameters
Fitted attributes
['year_first_hired']
Parameters
['date_first_hired']
Parameters
['gender', 'department', 'department_name', 'assignment_category']
Parameters
['division', 'employee_position_title']
Parameters
69 features
| gender |
| department |
| department_name |
| division_00 |
| division_01 |
| division_02 |
| division_03 |
| division_04 |
| division_05 |
| division_06 |
| division_07 |
| division_08 |
| division_09 |
| division_10 |
| division_11 |
| division_12 |
| division_13 |
| division_14 |
| division_15 |
| division_16 |
| division_17 |
| division_18 |
| division_19 |
| division_20 |
| division_21 |
| division_22 |
| division_23 |
| division_24 |
| division_25 |
| division_26 |
| division_27 |
| division_28 |
| division_29 |
| assignment_category |
| employee_position_title_00 |
| employee_position_title_01 |
| employee_position_title_02 |
| employee_position_title_03 |
| employee_position_title_04 |
| employee_position_title_05 |
| employee_position_title_06 |
| employee_position_title_07 |
| employee_position_title_08 |
| employee_position_title_09 |
| employee_position_title_10 |
| employee_position_title_11 |
| employee_position_title_12 |
| employee_position_title_13 |
| employee_position_title_14 |
| employee_position_title_15 |
| employee_position_title_16 |
| employee_position_title_17 |
| employee_position_title_18 |
| employee_position_title_19 |
| employee_position_title_20 |
| employee_position_title_21 |
| employee_position_title_22 |
| employee_position_title_23 |
| employee_position_title_24 |
| employee_position_title_25 |
| employee_position_title_26 |
| employee_position_title_27 |
| employee_position_title_28 |
| employee_position_title_29 |
| date_first_hired_year |
| date_first_hired_month |
| date_first_hired_day |
| date_first_hired_total_seconds |
| year_first_hired |
Parameters
Fitted attributes
| gender | department | department_name | division | assignment_category | employee_position_title | date_first_hired | year_first_hired | high_earner | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | F | CUS | Community Use of Public Facilities | Silver Spring Civic Building | Fulltime-Regular | Administrative Specialist II | 09/23/2013 | 2,013 | 0 |
| 1 | M | DOT | Department of Transportation | Highway Services | Fulltime-Regular | Work Force Leader II | 06/25/1979 | 1,979 | 1 |
| 2 | F | LIB | Department of Public Libraries | Marilyn J Praisner Library | Parttime-Regular | Library Assistant I | 11/05/2001 | 2,001 | 0 |
| 3 | M | DLC | Department of Liquor Control | Stock Liquor and Wine Warehouse Operations | Fulltime-Regular | Warehouse Worker | 09/25/2005 | 2,005 | 0 |
| 4 | F | HHS | Department of Health and Human Services | Information Systems and Technology | Fulltime-Regular | Senior Information Technology Specialist | 10/02/2000 | 2,000 | 1 |
| 9,223 | M | DOT | Department of Transportation | Highway Services | Fulltime-Regular | Equipment Operator I | 08/10/2015 | 2,015 | 0 |
| 9,224 | M | HHS | Department of Health and Human Services | Medical Assistance Eligibility Services | Fulltime-Regular | Income Assistance Program Specialist II | 12/05/1994 | 1,994 | 1 |
| 9,225 | F | DOT | Department of Transportation | Transit Gaithersburg Ride On | Fulltime-Regular | Bus Operator | 10/16/2006 | 2,006 | 0 |
| 9,226 | M | DOT | Department of Transportation | Transportation Planning and Design Section | Fulltime-Regular | Manager III | 01/14/2001 | 2,001 | 1 |
| 9,227 | M | COR | Correction and Rehabilitation | DS Health Services | Fulltime-Regular | Correctional Health Nurse II | 04/18/2016 | 2,016 | 0 |
gender
ObjectDType- Null values
- 17 (0.2%)
- Unique values
- 2 (< 0.1%)
department
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
department_name
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
division
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
assignment_category
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
employee_position_title
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
date_first_hired
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
year_first_hired
Int64DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2,005 ± 14
- Min | Max
- 1,965 | 2,016
high_earner
Int64DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.500 ± 0.500
- Median ± IQR
- 0 ± 1
- Min | Max
- 0 | 1
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
|
Column
|
Column name
|
dtype
|
Is sorted
|
Null values
|
Unique values
|
Mean
|
Std
|
Min
|
Median
|
Max
|
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | gender | ObjectDType | False | 17 (0.2%) | 2 (< 0.1%) | |||||
| 1 | department | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 2 | department_name | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 3 | division | ObjectDType | False | 0 (0.0%) | 694 (7.5%) | |||||
| 4 | assignment_category | ObjectDType | False | 0 (0.0%) | 2 (< 0.1%) | |||||
| 5 | employee_position_title | ObjectDType | False | 0 (0.0%) | 443 (4.8%) | |||||
| 6 | date_first_hired | ObjectDType | False | 0 (0.0%) | 2264 (24.5%) | |||||
| 7 | year_first_hired | Int64DType | False | 0 (0.0%) | 51 (0.6%) | 2.00e+03 | 9.33 | 1,965 | 2,005 | 2,016 |
| 8 | high_earner | Int64DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.500 | 0.500 | 0 | 0 | 1 |
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
Please enable javascript
The skrub table reports need javascript to display correctly. If you are displaying a report in a Jupyter notebook and you see this message, you may need to re-execute the cell or to trust the notebook (button on the top right or "File > Trust notebook").
SKD016 should tip that HistGradientBoostingClassifier remains at defaults. Read which parameters it lists — the next sections search or set those knobs.
report.checks.summarize()
- [SKD008] Highly correlated input features. 3 pair(s) of features have a Spearman correlation above 0.9. Highly correlated features can destabilize linear model coefficients and feature-importance estimates, and may cause collinearity-induced numerical issues.Dropping redundant features may also improve model performance.
- [SKD009] Model performance vs. HistGradientBoosting baseline. Your model is on par with or better than a HistGradientBoosting baseline. Baseline performance on the test set, for reference: Accuracy=0.939, Brier score=0.0434, Log loss=0.146, Precision=0.939, ROC AUC=0.987, Recall=0.939.
- [SKD012] Useless features. Feature(s) ['department_name', 'gender', 'year_first_hired'] have permutation importance overlapping with zero and could likely be dropped without degrading performance. Dropping redundant features may also improve model performance.
- [SKD016] Estimator not tuned. Estimator(s) left at default settings; consider tuning: ['learning_rate', 'max_leaf_nodes'] for HistGradientBoostingClassifier.
- [SKD003] Inconsistent performance across splits. Not applicable to estimator reports.
- [SKD005] Underrepresented classes. ML task is not multiclass classification. Got binary-classification.
- [SKD006] Coefficient interpretation. Estimator is not a linear model: it does not have a `coef_` attribute.
- [SKD007] MDI biased for high-cardinality features. Estimator is not a tree-based model: it does not have a `feature_importances_` attribute.
- [SKD013] Train-test overlap in time series. No datetime column found.
- [SKD014] Hyperparameters at search edge. Estimator is not a BaseSearchCV instance. Got Pipeline.
- [SKD015] Hyperparameters worth tuning. Estimator is not a BaseSearchCV instance. Got Pipeline.
No checks were skipped in fast mode.
No checks were muted.
Mute a check by passing its code to ignore, e.g. .checks.summarize(ignore=['SKD001']).
report.metrics.summarize(data_source="both").frame()
| HistGradientBoostingClassifier (train) | HistGradientBoostingClassifier (test) | |
|---|---|---|
| metric | ||
| accuracy | 0.988756 | 0.937161 |
| precision | 0.992087 | 0.938111 |
| recall | 0.985366 | 0.936078 |
| roc_auc | 0.999151 | 0.987118 |
| log_loss | 0.054099 | 0.146457 |
| brier_score | 0.012345 | 0.044194 |
| fit_time | 2.044371 | 2.044371 |
| predict_time | 0.782540 | 0.284502 |
Wrap the estimator in RandomizedSearchCV#
Search the axes SKD016 typically flags for HGB (learning rate, iteration budget, depth, leaf size) instead of accepting sklearn defaults. Once the report wraps a fitted search object, SKD016 clears.
A tuned search can still raise SKD014 or SKD015 if the box is too narrow or incomplete — see that combined example.
from scipy.stats import loguniform, randint
from sklearn.ensemble import HistGradientBoostingClassifier
from sklearn.model_selection import RandomizedSearchCV
base_pipeline = tabular_pipeline(HistGradientBoostingClassifier(random_state=42))
param_distributions = {
"histgradientboostingclassifier__learning_rate": loguniform(1e-2, 2e-1),
"histgradientboostingclassifier__max_iter": randint(100, 401),
"histgradientboostingclassifier__max_depth": [3, 5, 8, None],
"histgradientboostingclassifier__min_samples_leaf": randint(10, 51),
}
tuned_search = RandomizedSearchCV(
base_pipeline,
param_distributions=param_distributions,
n_iter=8,
cv=3,
scoring="neg_log_loss",
random_state=42,
refit=True,
)
report_tuned = skore.evaluate(
tuned_search,
X=X,
y=y,
pos_label=1,
splitter=splitter,
)
report_tuned
| Metric | RandomizedSearchCV |
|---|---|
| Score | -0.150687 |
| Accuracy | 0.937703 |
| Precision | 0.937229 |
| Recall | 0.938245 |
| ROC AUC | 0.986551 |
| Log loss | 0.150687 |
| Brier score | 0.045203 |
| Fit time (s) | 47.923457 |
| Predict time (s) | 0.166994 |
- [SKD014] Hyperparameters at search edge. 1 hyperparameter(s) are on the edge of the explored search space: histgradientboostingclassifier__max_depth (maximum). Consider extending the search range or increasing the number of iterations for randomized search.
No tips were emitted for your report.
- [SKD003] Inconsistent performance across splits. Not applicable to estimator reports.
- [SKD005] Underrepresented classes. ML task is not multiclass classification. Got binary-classification.
- [SKD006] Coefficient interpretation. Estimator is not a linear model: it does not have a `coef_` attribute.
- [SKD007] MDI biased for high-cardinality features. Estimator is not a tree-based model: it does not have a `feature_importances_` attribute.
- [SKD008] Highly correlated input features. Expected train data to have between 2 and 1000 features; got 1.
- [SKD013] Train-test overlap in time series. No datetime column found.
- [SKD016] Estimator not tuned. Estimator is a BaseSearchCV instance.
No checks were muted.
Fast mode is on: expensive checks are skipped unless already cached.
Mute a check by passing its code to ignore, e.g. .checks.summarize(ignore=['SKD001']).
RandomizedSearchCV(cv=3,
estimator=Pipeline(steps=[('tablevectorizer',
TableVectorizer(low_cardinality=ToCategorical())),
('histgradientboostingclassifier',
HistGradientBoostingClassifier(random_state=42))]),
n_iter=8,
param_distributions={'histgradientboostingclassifier__learning_rate': <scipy.stats._distn_infrastructure.rv_continuous_frozen object at 0x7f7...9e0>,
'histgradientboostingclassifier__max_depth': [3,
5,
8,
None],
'histgradientboostingclassifier__max_iter': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7f782c6387c0>,
'histgradientboostingclassifier__min_samples_leaf': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7f782c639bf0>},
random_state=42, scoring='neg_log_loss')In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Fitted attributes
Parameters
Fitted attributes
['year_first_hired']
Parameters
['date_first_hired']
Parameters
['gender', 'department', 'department_name', 'assignment_category']
Parameters
['division', 'employee_position_title']
Parameters
69 features
| gender |
| department |
| department_name |
| division_00 |
| division_01 |
| division_02 |
| division_03 |
| division_04 |
| division_05 |
| division_06 |
| division_07 |
| division_08 |
| division_09 |
| division_10 |
| division_11 |
| division_12 |
| division_13 |
| division_14 |
| division_15 |
| division_16 |
| division_17 |
| division_18 |
| division_19 |
| division_20 |
| division_21 |
| division_22 |
| division_23 |
| division_24 |
| division_25 |
| division_26 |
| division_27 |
| division_28 |
| division_29 |
| assignment_category |
| employee_position_title_00 |
| employee_position_title_01 |
| employee_position_title_02 |
| employee_position_title_03 |
| employee_position_title_04 |
| employee_position_title_05 |
| employee_position_title_06 |
| employee_position_title_07 |
| employee_position_title_08 |
| employee_position_title_09 |
| employee_position_title_10 |
| employee_position_title_11 |
| employee_position_title_12 |
| employee_position_title_13 |
| employee_position_title_14 |
| employee_position_title_15 |
| employee_position_title_16 |
| employee_position_title_17 |
| employee_position_title_18 |
| employee_position_title_19 |
| employee_position_title_20 |
| employee_position_title_21 |
| employee_position_title_22 |
| employee_position_title_23 |
| employee_position_title_24 |
| employee_position_title_25 |
| employee_position_title_26 |
| employee_position_title_27 |
| employee_position_title_28 |
| employee_position_title_29 |
| date_first_hired_year |
| date_first_hired_month |
| date_first_hired_day |
| date_first_hired_total_seconds |
| year_first_hired |
Parameters
Fitted attributes
| gender | department | department_name | division | assignment_category | employee_position_title | date_first_hired | year_first_hired | high_earner | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | F | CUS | Community Use of Public Facilities | Silver Spring Civic Building | Fulltime-Regular | Administrative Specialist II | 09/23/2013 | 2,013 | 0 |
| 1 | M | DOT | Department of Transportation | Highway Services | Fulltime-Regular | Work Force Leader II | 06/25/1979 | 1,979 | 1 |
| 2 | F | LIB | Department of Public Libraries | Marilyn J Praisner Library | Parttime-Regular | Library Assistant I | 11/05/2001 | 2,001 | 0 |
| 3 | M | DLC | Department of Liquor Control | Stock Liquor and Wine Warehouse Operations | Fulltime-Regular | Warehouse Worker | 09/25/2005 | 2,005 | 0 |
| 4 | F | HHS | Department of Health and Human Services | Information Systems and Technology | Fulltime-Regular | Senior Information Technology Specialist | 10/02/2000 | 2,000 | 1 |
| 9,223 | M | DOT | Department of Transportation | Highway Services | Fulltime-Regular | Equipment Operator I | 08/10/2015 | 2,015 | 0 |
| 9,224 | M | HHS | Department of Health and Human Services | Medical Assistance Eligibility Services | Fulltime-Regular | Income Assistance Program Specialist II | 12/05/1994 | 1,994 | 1 |
| 9,225 | F | DOT | Department of Transportation | Transit Gaithersburg Ride On | Fulltime-Regular | Bus Operator | 10/16/2006 | 2,006 | 0 |
| 9,226 | M | DOT | Department of Transportation | Transportation Planning and Design Section | Fulltime-Regular | Manager III | 01/14/2001 | 2,001 | 1 |
| 9,227 | M | COR | Correction and Rehabilitation | DS Health Services | Fulltime-Regular | Correctional Health Nurse II | 04/18/2016 | 2,016 | 0 |
gender
ObjectDType- Null values
- 17 (0.2%)
- Unique values
- 2 (< 0.1%)
department
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
department_name
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
division
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
assignment_category
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
employee_position_title
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
date_first_hired
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
year_first_hired
Int64DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2,005 ± 14
- Min | Max
- 1,965 | 2,016
high_earner
Int64DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.500 ± 0.500
- Median ± IQR
- 0 ± 1
- Min | Max
- 0 | 1
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
|
Column
|
Column name
|
dtype
|
Is sorted
|
Null values
|
Unique values
|
Mean
|
Std
|
Min
|
Median
|
Max
|
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | gender | ObjectDType | False | 17 (0.2%) | 2 (< 0.1%) | |||||
| 1 | department | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 2 | department_name | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 3 | division | ObjectDType | False | 0 (0.0%) | 694 (7.5%) | |||||
| 4 | assignment_category | ObjectDType | False | 0 (0.0%) | 2 (< 0.1%) | |||||
| 5 | employee_position_title | ObjectDType | False | 0 (0.0%) | 443 (4.8%) | |||||
| 6 | date_first_hired | ObjectDType | False | 0 (0.0%) | 2264 (24.5%) | |||||
| 7 | year_first_hired | Int64DType | False | 0 (0.0%) | 51 (0.6%) | 2.00e+03 | 9.33 | 1,965 | 2,005 | 2,016 |
| 8 | high_earner | Int64DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.500 | 0.500 | 0 | 0 | 1 |
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
Please enable javascript
The skrub table reports need javascript to display correctly. If you are displaying a report in a Jupyter notebook and you see this message, you may need to re-execute the cell or to trust the notebook (button on the top right or "File > Trust notebook").
SKD016 should be absent; the report wraps a fitted search object.
report_tuned.checks.summarize(fast_mode=True)
- [SKD014] Hyperparameters at search edge. 1 hyperparameter(s) are on the edge of the explored search space: histgradientboostingclassifier__max_depth (maximum). Consider extending the search range or increasing the number of iterations for randomized search.
No tips were emitted for your report.
- [SKD003] Inconsistent performance across splits. Not applicable to estimator reports.
- [SKD005] Underrepresented classes. ML task is not multiclass classification. Got binary-classification.
- [SKD006] Coefficient interpretation. Estimator is not a linear model: it does not have a `coef_` attribute.
- [SKD007] MDI biased for high-cardinality features. Estimator is not a tree-based model: it does not have a `feature_importances_` attribute.
- [SKD008] Highly correlated input features. Expected train data to have between 2 and 1000 features; got 1.
- [SKD013] Train-test overlap in time series. No datetime column found.
- [SKD016] Estimator not tuned. Estimator is a BaseSearchCV instance.
No checks were muted.
Fast mode is on: expensive checks are skipped unless already cached.
Mute a check by passing its code to ignore, e.g. .checks.summarize(ignore=['SKD001']).
{'histgradientboostingclassifier__learning_rate': np.float64(0.060099747183803134), 'histgradientboostingclassifier__max_depth': 8, 'histgradientboostingclassifier__max_iter': 221, 'histgradientboostingclassifier__min_samples_leaf': 28}
Set sensible non-default values manually#
When a full search is impractical, hand-pick hyperparameters that differ from defaults. SKD016 clears as soon as impactful knobs are no longer factory settings — that is an intentional configuration signal, not proof that the values are optimal. Prefer validated search when you can afford it.
model_manual = tabular_pipeline(
HistGradientBoostingClassifier(
learning_rate=0.05,
max_iter=200,
max_depth=5,
min_samples_leaf=20,
random_state=42,
)
)
report_manual = skore.evaluate(
model_manual,
X=X,
y=y,
pos_label=1,
splitter=splitter,
)
report_manual
| Metric | HistGradientBoostingClassifier |
|---|---|
| Accuracy | 0.933369 |
| Precision | 0.931034 |
| Recall | 0.936078 |
| ROC AUC | 0.985018 |
| Log loss | 0.157725 |
| Brier score | 0.046415 |
| Fit time (s) | 1.383695 |
| Predict time (s) | 0.155745 |
- [SKD008] Highly correlated input features. 3 pair(s) of features have a Spearman correlation above 0.9. Highly correlated features can destabilize linear model coefficients and feature-importance estimates, and may cause collinearity-induced numerical issues.Dropping redundant features may also improve model performance.
No tips were emitted for your report.
- [SKD003] Inconsistent performance across splits. Not applicable to estimator reports.
- [SKD005] Underrepresented classes. ML task is not multiclass classification. Got binary-classification.
- [SKD006] Coefficient interpretation. Estimator is not a linear model: it does not have a `coef_` attribute.
- [SKD007] MDI biased for high-cardinality features. Estimator is not a tree-based model: it does not have a `feature_importances_` attribute.
- [SKD013] Train-test overlap in time series. No datetime column found.
- [SKD014] Hyperparameters at search edge. Estimator is not a BaseSearchCV instance. Got Pipeline.
- [SKD015] Hyperparameters worth tuning. Estimator is not a BaseSearchCV instance. Got Pipeline.
No checks were muted.
Fast mode is on: expensive checks are skipped unless already cached.
Mute a check by passing its code to ignore, e.g. .checks.summarize(ignore=['SKD001']).
Pipeline(steps=[('tablevectorizer',
TableVectorizer(low_cardinality=ToCategorical())),
('histgradientboostingclassifier',
HistGradientBoostingClassifier(learning_rate=0.05, max_depth=5,
max_iter=200,
random_state=42))])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Fitted attributes
Parameters
Fitted attributes
['year_first_hired']
Parameters
['date_first_hired']
Parameters
['gender', 'department', 'department_name', 'assignment_category']
Parameters
['division', 'employee_position_title']
Parameters
69 features
| gender |
| department |
| department_name |
| division_00 |
| division_01 |
| division_02 |
| division_03 |
| division_04 |
| division_05 |
| division_06 |
| division_07 |
| division_08 |
| division_09 |
| division_10 |
| division_11 |
| division_12 |
| division_13 |
| division_14 |
| division_15 |
| division_16 |
| division_17 |
| division_18 |
| division_19 |
| division_20 |
| division_21 |
| division_22 |
| division_23 |
| division_24 |
| division_25 |
| division_26 |
| division_27 |
| division_28 |
| division_29 |
| assignment_category |
| employee_position_title_00 |
| employee_position_title_01 |
| employee_position_title_02 |
| employee_position_title_03 |
| employee_position_title_04 |
| employee_position_title_05 |
| employee_position_title_06 |
| employee_position_title_07 |
| employee_position_title_08 |
| employee_position_title_09 |
| employee_position_title_10 |
| employee_position_title_11 |
| employee_position_title_12 |
| employee_position_title_13 |
| employee_position_title_14 |
| employee_position_title_15 |
| employee_position_title_16 |
| employee_position_title_17 |
| employee_position_title_18 |
| employee_position_title_19 |
| employee_position_title_20 |
| employee_position_title_21 |
| employee_position_title_22 |
| employee_position_title_23 |
| employee_position_title_24 |
| employee_position_title_25 |
| employee_position_title_26 |
| employee_position_title_27 |
| employee_position_title_28 |
| employee_position_title_29 |
| date_first_hired_year |
| date_first_hired_month |
| date_first_hired_day |
| date_first_hired_total_seconds |
| year_first_hired |
Parameters
Fitted attributes
| gender | department | department_name | division | assignment_category | employee_position_title | date_first_hired | year_first_hired | high_earner | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | F | CUS | Community Use of Public Facilities | Silver Spring Civic Building | Fulltime-Regular | Administrative Specialist II | 09/23/2013 | 2,013 | 0 |
| 1 | M | DOT | Department of Transportation | Highway Services | Fulltime-Regular | Work Force Leader II | 06/25/1979 | 1,979 | 1 |
| 2 | F | LIB | Department of Public Libraries | Marilyn J Praisner Library | Parttime-Regular | Library Assistant I | 11/05/2001 | 2,001 | 0 |
| 3 | M | DLC | Department of Liquor Control | Stock Liquor and Wine Warehouse Operations | Fulltime-Regular | Warehouse Worker | 09/25/2005 | 2,005 | 0 |
| 4 | F | HHS | Department of Health and Human Services | Information Systems and Technology | Fulltime-Regular | Senior Information Technology Specialist | 10/02/2000 | 2,000 | 1 |
| 9,223 | M | DOT | Department of Transportation | Highway Services | Fulltime-Regular | Equipment Operator I | 08/10/2015 | 2,015 | 0 |
| 9,224 | M | HHS | Department of Health and Human Services | Medical Assistance Eligibility Services | Fulltime-Regular | Income Assistance Program Specialist II | 12/05/1994 | 1,994 | 1 |
| 9,225 | F | DOT | Department of Transportation | Transit Gaithersburg Ride On | Fulltime-Regular | Bus Operator | 10/16/2006 | 2,006 | 0 |
| 9,226 | M | DOT | Department of Transportation | Transportation Planning and Design Section | Fulltime-Regular | Manager III | 01/14/2001 | 2,001 | 1 |
| 9,227 | M | COR | Correction and Rehabilitation | DS Health Services | Fulltime-Regular | Correctional Health Nurse II | 04/18/2016 | 2,016 | 0 |
gender
ObjectDType- Null values
- 17 (0.2%)
- Unique values
- 2 (< 0.1%)
department
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
department_name
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 37 (0.4%)
division
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
assignment_category
ObjectDType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
employee_position_title
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
date_first_hired
ObjectDType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
year_first_hired
Int64DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2,005 ± 14
- Min | Max
- 1,965 | 2,016
high_earner
Int64DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.500 ± 0.500
- Median ± IQR
- 0 ± 1
- Min | Max
- 0 | 1
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
|
Column
|
Column name
|
dtype
|
Is sorted
|
Null values
|
Unique values
|
Mean
|
Std
|
Min
|
Median
|
Max
|
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | gender | ObjectDType | False | 17 (0.2%) | 2 (< 0.1%) | |||||
| 1 | department | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 2 | department_name | ObjectDType | False | 0 (0.0%) | 37 (0.4%) | |||||
| 3 | division | ObjectDType | False | 0 (0.0%) | 694 (7.5%) | |||||
| 4 | assignment_category | ObjectDType | False | 0 (0.0%) | 2 (< 0.1%) | |||||
| 5 | employee_position_title | ObjectDType | False | 0 (0.0%) | 443 (4.8%) | |||||
| 6 | date_first_hired | ObjectDType | False | 0 (0.0%) | 2264 (24.5%) | |||||
| 7 | year_first_hired | Int64DType | False | 0 (0.0%) | 51 (0.6%) | 2.00e+03 | 9.33 | 1,965 | 2,005 | 2,016 |
| 8 | high_earner | Int64DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.500 | 0.500 | 0 | 0 | 1 |
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
Please enable javascript
The skrub table reports need javascript to display correctly. If you are displaying a report in a Jupyter notebook and you see this message, you may need to re-execute the cell or to trust the notebook (button on the top right or "File > Trust notebook").
SKD016 should be absent once hyperparameters differ from defaults.
report_manual.checks.summarize(fast_mode=True)
- [SKD008] Highly correlated input features. 3 pair(s) of features have a Spearman correlation above 0.9. Highly correlated features can destabilize linear model coefficients and feature-importance estimates, and may cause collinearity-induced numerical issues.Dropping redundant features may also improve model performance.
No tips were emitted for your report.
- [SKD003] Inconsistent performance across splits. Not applicable to estimator reports.
- [SKD005] Underrepresented classes. ML task is not multiclass classification. Got binary-classification.
- [SKD006] Coefficient interpretation. Estimator is not a linear model: it does not have a `coef_` attribute.
- [SKD007] MDI biased for high-cardinality features. Estimator is not a tree-based model: it does not have a `feature_importances_` attribute.
- [SKD013] Train-test overlap in time series. No datetime column found.
- [SKD014] Hyperparameters at search edge. Estimator is not a BaseSearchCV instance. Got Pipeline.
- [SKD015] Hyperparameters worth tuning. Estimator is not a BaseSearchCV instance. Got Pipeline.
No checks were muted.
Fast mode is on: expensive checks are skipped unless already cached.
Mute a check by passing its code to ignore, e.g. .checks.summarize(ignore=['SKD001']).
report_manual.metrics.summarize(data_source="both").frame()
| HistGradientBoostingClassifier (train) | HistGradientBoostingClassifier (test) | |
|---|---|---|
| metric | ||
| accuracy | 0.969927 | 0.933369 |
| precision | 0.968649 | 0.931034 |
| recall | 0.971274 | 0.936078 |
| roc_auc | 0.996075 | 0.985018 |
| log_loss | 0.096833 | 0.157725 |
| brier_score | 0.025237 | 0.046415 |
| fit_time | 1.383695 | 1.383695 |
| predict_time | 0.469582 | 0.155745 |
Compare mitigations#
Hold-out metrics for the default pipeline and the hand-tuned one. The
RandomizedSearchCV report wraps a search estimator, so its metric table can
look different in compare(); we show it in its own cell below.
comparison = skore.compare(
{
"default_pipeline": report,
"hand_tuned_hgb": report_manual,
}
)
comparison.metrics.summarize(data_source="both").frame()
| default_pipeline (train) | default_pipeline (test) | hand_tuned_hgb (train) | hand_tuned_hgb (test) | |
|---|---|---|---|---|
| metric | ||||
| accuracy | 0.988756 | 0.937161 | 0.969927 | 0.933369 |
| precision | 0.992087 | 0.938111 | 0.968649 | 0.931034 |
| recall | 0.985366 | 0.936078 | 0.971274 | 0.936078 |
| roc_auc | 0.999151 | 0.987118 | 0.996075 | 0.985018 |
| log_loss | 0.054099 | 0.146457 | 0.096833 | 0.157725 |
| brier_score | 0.012345 | 0.044194 | 0.025237 | 0.046415 |
| fit_time | 2.044371 | 2.044371 | 1.383695 | 1.383695 |
| predict_time | 0.782540 | 0.284502 | 0.469582 | 0.155745 |
report_tuned.metrics.summarize(data_source="both").frame()
| RandomizedSearchCV (train) | RandomizedSearchCV (test) | |
|---|---|---|
| metric | ||
| score | -0.048947 | -0.150687 |
| accuracy | 0.988756 | 0.937703 |
| precision | 0.991551 | 0.937229 |
| recall | 0.985908 | 0.938245 |
| roc_auc | 0.999260 | 0.986551 |
| log_loss | 0.048947 | 0.150687 |
| brier_score | 0.011166 | 0.045203 |
| fit_time | 47.923457 | 47.923457 |
| predict_time | 0.490584 | 0.166994 |
Conclusion#
SKD016 nudges you off scikit-learn defaults for high-impact estimators.
Randomized search and hand-tuned HGB parameters both clear the tip; clearing
the check means you left factory settings, not that the model is finished.
Pair manual choices with periodic search, and watch SKD014/SKD015 once you
wrap a BaseSearchCV.
Total running time of the script: (1 minutes 42.095 seconds)