{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/8"}],"enrichment":{"capability":"Wraps XGBoost with weighted and focal loss functions to handle binary classification on imbalanced datasets, computing the required gradients automatically.","skillfed_tags":["imbalanced-classification","gradient-boosting","sklearn-compatible"],"use_cases":["Tuning focal loss hyperparameters (\u03b3) on imbalanced binary datasets using GridSearchCV.","Comparing weighted loss (\u03b1) versus focal loss on the same imbalanced classification problem.","Integrating custom loss functions into scikit-learn pipelines and cross-validation workflows.","Evaluating classification performance on imbalanced data using confusion matrix metrics.","Training boosted models when one class is significantly underrepresented in the training set."],"what_it_does":"Imbalance-XGBoost is a wrapper around XGBoost that implements weighted and focal loss functions for binary classification on imbalanced datasets. The package handles the mathematical complexity of computing first and second-order gradients required by XGBoost's custom loss interface, so you can use these loss functions without deriving the math yourself. It exposes the loss choice via a `special_objective` parameter and allows tuning of the imbalance factor (\u03b1) and focal parameter (\u03b3) at initialization.\n\nThe wrapper is designed to be compatible with scikit-learn's API, so you can use it with GridSearchCV and other sklearn utilities for hyperparameter tuning. It provides multiple prediction methods (raw logits, sigmoid probabilities, binary class labels, and two-class probability distributions) and includes evaluation functions for metrics like accuracy, precision, recall, F1, and confusion matrix components. However, the package has not been actively maintained since February 2021, and its compatibility with modern Python and XGBoost versions is untested.","worth_installing":"Yes, if you need focal or weighted loss for XGBoost on imbalanced binary classification and are willing to test compatibility with your XGBoost version. The package has low install friction and permissive licensing. However, dormancy since 2021 means no active maintenance, so verify it works with your current environment before relying on it in production."},"id":"imbalance-xgboost","links":{"html":"https://skillfed.io/packages/imbalance-xgboost","md":"https://skillfed.io/packages/imbalance-xgboost.md","pypi":"https://pypi.org/project/imbalance-xgboost/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2021-02-08","license_spdx":null,"license_treatment":"permissive","name":"imbalance-xgboost","python_support":"unspecified","summary":"XGBoost for label-imbalanced data: XGBoost with weighted and focal loss functions"},"popularity":{"monthly_downloads":151179,"position":10940,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.8.1"}
