Welcome to Model Tuner’s Documentation!
Important
This documentation is for model_tuner version 0.0.028b.
What Does Model Tuner Offer?
Model Tuner is a versatile and powerful tool designed to facilitate the training, evaluation, and tuning of machine learning models. It supports various functionalities such as handling imbalanced data, applying different scaling and imputation techniques, calibrating models, and conducting cross-validation. This class is particularly useful for model selection and hyperparameter tuning, ensuring optimal performance across different metrics. Here are the key features it offers:
Hyperparameter Tuning: Facilitates hyperparameter optimization to fine-tune model parameters.
Performance Metrics: Provides bootstrap metrics and general performance metrics to evaluate model effectiveness.
Model Calibration: Supports calibration methods such as
sigmoidandisotonicto improve probability estimates.Threshold Tuning: Allows for threshold tuning to optimize classification performance.
Custom Pipelines: Enables the creation of custom pipelines for flexible and robust model workflows.
K-Fold Cross-Validation: Implements
K-Fold cross-validationto assess model performance across different data splits.Stratified Splits: Ensures balanced splits of data based on target variable distribution.
Model Compatibility: Compatible with all scikit-learn models.
XGBoost and CatBoost Integration: Includes early stopping for
XGBoostandCatBoostto prevent overfitting and improve model performance.Data Imputation: Supports imputation using
SimpleImputerand is compatible with other imputation strategies.Feature Scaling: Includes feature scaling methods like
MinMaxscaling.Feature Selection: Offers feature selection techniques such as
SelectKBestandRecursive Feature Elimination (RFE).Imbalanced Learning: Provides oversampling methods like
ADASYNandSMOTEto handle imbalanced datasets.Multi-Class Label Support: Currently under development to support multi-class classification tasks.
Prerequisites
Before installing model_tuner, ensure your system meets the following requirements:
Python: version
3.7or higher.
The model_tuner library includes different dependencies based on Python versions,
which will be automatically installed when you install model_tuner using pip. Below are the key dependencies:
For Python
3.7:numpy: version1.21.4pandas: version1.1.5scikit-learn: version0.23.2scipy: version1.4.1joblib: version1.3.2tqdm: version4.66.4imbalanced-learn: version0.7.0scikit-optimize: version0.8.1xgboost: version1.6.2pip: version24.0
For Python
3.8to<3.11:numpy: versions between1.19.5and<2.0.0pandas: versions between1.3.5and<2.2.3scikit-learn: versions between1.0.2and<1.4.0scipy: versions between1.6.3and<1.11joblib: version1.3.2tqdm: version4.66.4imbalanced-learn: version0.12.4scikit-optimize: version0.10.2xgboost: version2.1.2pip: version24.2setuptools: version75.1.0wheel: version0.44.0
For Python
3.11or higher:numpy: versions between1.19.5and<2.0.0pandas: versions between1.3.5and<2.2.2scikit-learn: version1.5.1scipy: version1.14.0joblib: version1.3.2tqdm: version4.66.4imbalanced-learn: version0.12.4scikit-optimize: version0.10.2xgboost: version2.1.2pip: version24.2setuptools: version75.1.0wheel: version0.44.0
Installation
You can install model_tuner directly from PyPI:
pip install model_tuner