Model Tuner Documentation
Getting Started
Usage Guide
- iPython Notebooks
- Input Parameters
- Key Methods and Functionalities
__init__(...)
reset_estimator()
process_imbalance_sampler()
calibrateModel()
- Get train, val, test data
calibrate_report()
fit()
return_metrics()
predict()
grid_search_param_tuning()
print_selected_best_features()
tune_threshold_Fbeta()
train_val_test_split()
get_best_score_params()
conf_mat_class_kfold()
regression_report_kfold()
regression_report()
report_model_metrics()
find_optimal_threshold_beta()
- Helper Functions
- Pipeline Management
- Binary Classification
- AIDS Clinical Trials Group Study
- Step 1: Import Necessary libraries
- Step 2: Load the dataset, define X, y
- Step 3: Check for zero-variance columns and drop accordingly
- Step 4: Create an instance of the XGBClassifier
- Step 5: Define Hyperparameters for XGBoost
- Step 6: Initialize and configure the
Model
- Step 7: Perform grid search parameter tuning and retrieve split data
- Step 8: Fit the model
- Step 9: Return metrics (optional)
- Step 10: Calibrate the model (if needed)
- F1 Beta Threshold Tuning
- Imbalanced Learning
- Recursive Feature Elimination (RFE)
- SHAP (SHapley Additive exPlanations)
- Step 1: Transform the test data using the feature selection pipeline
- Step 2: Retrieve the trained XGBoost classifier from the pipeline
- Step 3: Extract feature names from the training data, and initialize the SHAP explainer for the XGBoost classifier
- Step 4: Compute SHAP values for the transformed test dataset and generate a summary plot of SHAP values
- Step 5: Generate a summary plot of SHAP values
- Feature Importance and Impact
- AIDS Clinical Trials Group Study
- Multi-Class Classification
- Iris Dataset with XGBoost
- Step 1: Import Necessary Libraries
- Step 2: Load the dataset. Define X, y
- Step 3: Define the preprocessing steps
- Step 4: Define the estimator and hyperparameters
- Step 5: Initialize and configure the model
- Step 6: Perform grid search parameter tuning
- Step 7: Generate data splits
- Step 8: Fit the model
- Step 9: Return metrics (optional)
- Step 10: Predict probabilities and generate predictions
- Iris Dataset with XGBoost
- Regression
- California Housing with XGBoost
- Step 1: Import necessary libraries
- Step 2: Load the dataset
- Step 3: Create an instance of the XGBRegressor
- Step 4: Define Hyperparameters for XGBRegressor
- Step 5: Initialize and configure the
Model
- Step 6: Perform grid search parameter tuning and retrieve split data
- Step 7: Fit the model
- Step 8: Return metrics (optional)
- California Housing with XGBoost
- Performance Evaluation Metrics
- Bootstrap Metrics
Caveats
- Zero Variance Columns
- Dependent Variable
- Scaling Before Imputation
- Column Stratification with Cross-Validation
- Model Calibration
- Using Imputation and Scaling in Pipeline Steps for Model Preprocessing
- Caveats in Imbalanced Learning
- Threshold Tuning Considerations
- ElasticNet Regularization
- CatBoost Training Parameters
About Model Tuner
- GitHub Repository
- Acknowledgements
- Citing Model Tuner
- Changelog
- Version 0.0.28b (Beta)
- Version 0.0.27b (Beta)
- Version 0.0.26b (Beta)
- Version 0.0.25a
- Version 0.0.24a
- Version 0.0.23a
- Version 0.0.22a
- Version 0.0.21a
- Version 0.0.20a
- Version 0.0.19a
- Version 0.0.18a
- Version 0.0.17a
- Version 0.0.16a
- Version 0.0.15a
- Version 0.0.014a
- Version 0.0.013a
- Version 0.0.012a
- Version 0.0.011a
- Version 0.0.010a
- Version 0.0.09a
- Version 0.0.08a
- Version 0.0.07a
- Version 0.0.06a
- Version 0.0.05a
- Version 0.0.02a
- References