File size: 1,463 Bytes
e6cf89b 0e8a7da |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
---
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.
|