Welcome to Model Tuner’s Documentation!
Important
This documentation is for model_tuner
version 0.0.017a
.
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
sigmoid
andisotonic
to 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-validation
to 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
XGBoost
andCatBoost
to prevent overfitting and improve model performance.Data Imputation: Supports imputation using
SimpleImputer
and is compatible with other imputation strategies.Feature Scaling: Includes feature scaling methods like
MinMax
scaling.Feature Selection: Offers feature selection techniques such as
SelectKBest
andRecursive Feature Elimination (RFE)
.Imbalanced Learning: Provides oversampling methods like
ADASYN
andSMOTE
to 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.7
or 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.4
pandas
: version1.1.5
scikit-learn
: version0.23.2
scipy
: version1.4.1
joblib
: version1.3.2
tqdm
: version4.66.4
imbalanced-learn
: version0.7.0
scikit-optimize
: version0.8.1
xgboost
: version1.6.2
pip
: version24.0
For Python
3.8
to<3.11
:numpy
: versions between1.19.5
and<2.0.0
pandas
: versions between1.3.5
and<2.2.3
scikit-learn
: versions between1.0.2
and<1.4.0
scipy
: versions between1.6.3
and<1.11
joblib
: version1.3.2
tqdm
: version4.66.4
imbalanced-learn
: version0.12.4
scikit-optimize
: version0.10.2
xgboost
: version2.1.2
pip
: version24.2
setuptools
: version75.1.0
wheel
: version0.44.0
For Python
3.11
or higher:numpy
: versions between1.19.5
and<2.0.0
pandas
: versions between1.3.5
and<2.2.2
scikit-learn
: version1.5.1
scipy
: version1.14.0
joblib
: version1.3.2
tqdm
: version4.66.4
imbalanced-learn
: version0.12.4
scikit-optimize
: version0.10.2
xgboost
: version2.1.2
pip
: version24.2
setuptools
: version75.1.0
wheel
: version0.44.0
Installation
You can install model_tuner
directly from PyPI:
pip install model_tuner