ivwhy's picture
Update README.md
e6cf89b verified
---
title: Champion Predictor Model
author: Group 43 ID2223 HT24
description: A repository containing an XGBoost-based Champion Predictor model to predict champions based on input features.
---
# Champion Predictor Model
This repository contains the files for an XGBoost-based Champion Predictor model. The model predicts champions based on input features.
## Files
- **champion_predictor.json**: Serialized XGBoost model saved in JSON format.
- **label_encoder.joblib**: Label encoder used for encoding and decoding champion names.
- **training_feature.csv**: Dataset used for training the model.
## How to Use
1. Clone the repository:
```bash
git clone https://huggingface.co/USERNAME/champion-predictor
cd champion-predictor
```
2. Load the model in your Python code:
```python
import xgboost as xgb
import joblib
import pandas as pd
# Load model
model = xgb.Booster()
model.load_model("champion_predictor.json")
# Load label encoder
label_encoder = joblib.load("label_encoder.joblib")
# Example usage
input_features = pd.read_csv("training_feature.csv").iloc[0:1, :-1] # Example input
prediction = model.predict(xgb.DMatrix(input_features))
predicted_label = label_encoder.inverse_transform([prediction.argmax()])
print(f"Predicted Champion: {predicted_label[0]}")
```
## Acknowledgments
This model was developed as part of the ID2223 Scalable Machine Learning and Deep Learning course.