generated from XpressAI/xai-component-library-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
94 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,96 @@ | ||
# XAI XGBoost Component Library | ||
<p align="center"> | ||
<a href="https://github.com/XpressAI/xircuits/tree/master/xai_components#xircuits-component-library-list">Component Libraries</a> • | ||
<a href="https://github.com/XpressAI/xircuits/tree/master/project-templates#xircuits-project-templates-list">Project Templates</a> | ||
<br> | ||
<a href="https://xircuits.io/">Docs</a> • | ||
<a href="https://xircuits.io/docs/Installation">Install</a> • | ||
<a href="https://xircuits.io/docs/category/tutorials">Tutorials</a> • | ||
<a href="https://xircuits.io/docs/category/developer-guide">Developer Guides</a> • | ||
<a href="https://github.com/XpressAI/xircuits/blob/master/CONTRIBUTING.md">Contribute</a> • | ||
<a href="https://www.xpress.ai/blog/">Blog</a> • | ||
<a href="https://discord.com/invite/vgEg2ZtxCw">Discord</a> | ||
</p> | ||
|
||
Xircuits component library for [XGBoost](https://github.com/dmlc/xgboost). | ||
|
||
## Installation | ||
<p align="center"><i>Build efficient and scalable machine learning models with the Xircuits Component Library for XGBoost integration!</i></p> | ||
|
||
|
||
--- | ||
## Xircuits Component Library for XGBoost | ||
|
||
This library integrates XGBoost into Xircuits workflows, enabling seamless model training, evaluation, and optimization for scalable and efficient machine learning tasks. | ||
|
||
## Table of Contents | ||
|
||
- [Preview](#preview) | ||
|
||
- [Prerequisites](#prerequisites) | ||
- [Main Xircuits Components](#main-xircuits-components) | ||
- [Try the Examples](#try-the-examples) | ||
- [Installation](#installation) | ||
|
||
## Preview | ||
### The Example | ||
|
||
<img src="https://github.com/user-attachments/assets/c2f33571-e4ce-4124-8935-a25b8095104e" alt="XGBoostClassifier example" /> | ||
|
||
|
||
### The Result | ||
|
||
<img src="https://github.com/user-attachments/assets/51a6f8d4-5567-4dc0-b0da-5cfb7b23fd02" alt="XGBoostClassifier result" /> | ||
|
||
## Prerequisites | ||
|
||
Before you begin, you will need the following: | ||
|
||
1. Python3.9+. | ||
2. Xircuits. | ||
|
||
## Main Xircuits Components | ||
|
||
### XGBoostBinaryClassifier Component: | ||
Trains a binary classifier with XGBoost, allowing customization of parameters like tree depth, learning rate, and boosting objective. | ||
|
||
<img src="https://github.com/user-attachments/assets/c13c82f5-c5a0-4191-996a-2e0fd686e4dc" alt="XGBoostBinaryClassifier" width="200" height="150" /> | ||
|
||
|
||
### XGBoostMultiClassClassifier Component: | ||
Trains an XGBoost classifier for multi-class problems with configurable tree depth, learning rate, and objective functions. Suitable for tasks requiring efficient handling of multi-class datasets. | ||
|
||
<img src="https://github.com/user-attachments/assets/787991f9-c316-408b-a84a-a29d7670f157" alt="XGBoostMultiClassClassifier" width="200" height="175" /> | ||
|
||
|
||
### XGBoostRegressor Component: | ||
Trains an XGBoost regressor for regression tasks, supporting objectives like squared error and logistic regression. Offers high flexibility and accuracy in modeling numerical targets. | ||
|
||
<img src="https://github.com/user-attachments/assets/2cd0b052-086a-46ff-9c4b-749818d95069" alt="XGBoostRegressor" width="200" height="150" /> | ||
|
||
|
||
### XGBoostRanker Component: | ||
Trains an XGBoost model for ranking tasks using objectives like pairwise and ndcg. Designed for learning-to-rank problems, it optimizes rank-based evaluation metrics. | ||
|
||
<img src="https://github.com/user-attachments/assets/e8bb0e7e-e72e-479d-8dec-e65422e2441f" alt="XGBoostRanker" width="200" height="150" /> | ||
|
||
### XGBoostBinaryPredict Component: | ||
Generates predictions from a trained XGBoost binary classifier. Optionally evaluates the accuracy of predictions if the target variable is provided. | ||
|
||
<img src="https://github.com/user-attachments/assets/3f182a30-d848-4272-a2ce-6c9fc495d5bc" alt="XGBoostBinaryPredict" width="200" height="100" /> | ||
|
||
## Try the Examples | ||
We have provided an example workflow to help you get started with the XGBoost component library. Give it a try and see how you can create custom XGBoost components for your applications. | ||
|
||
### XGBoostClassifier | ||
|
||
This example demonstrates a workflow for training and testing an XGBoost binary classifier using the Iris dataset. It splits the dataset into training and testing sets, trains the classifier, and evaluates its performance with predictions and accuracy. | ||
|
||
## Installation | ||
To use this component library, ensure that you have an existing [Xircuits setup](https://xircuits.io/docs/main/Installation). You can then install the XGBoost library using the [component library interface](https://xircuits.io/docs/component-library/installation#installation-using-the-xircuits-library-interface), or through the CLI using: | ||
``` | ||
xircuits install xgboost | ||
``` | ||
You can also do it manually by cloning and installing it: | ||
``` | ||
pip install xgboost | ||
``` | ||
# base Xircuits directory | ||
git clone https://github.com/XpressAI/xai-xgboost xai_components/xai_xgboost | ||
pip install -r xai_components/xai_xgboost/requirements.txt | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
xgboost==2.1.1 | ||
scikit-learn==1.5.2 |