-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/EbrahimAlwajih/Radar-Diagram
- Loading branch information
Showing
2 changed files
with
132 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload entire repository | ||
path: '.' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Radar Diagram | ||
|
||
This repository contains the code for creating radar diagrams to visualize the performance of various models based on multiple evaluation metrics. The radar charts are generated from a CSV file containing the models' metrics, and the resulting charts are saved as SVG files. | ||
|
||
## Features | ||
|
||
- Generates radar charts for multiple models from a CSV file. | ||
- Saves the radar charts as SVG files in a specified folder. | ||
- Customizable categories for the radar charts. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
Ensure you have the following Python packages installed: | ||
|
||
- `matplotlib` | ||
- `pandas` | ||
|
||
You can install these packages using `pip`: | ||
|
||
```bash | ||
pip install matplotlib pandas | ||
``` | ||
|
||
### Repository Structure | ||
|
||
- `RadarChart.py`: Contains the `RadarChart` class and script to generate radar charts. | ||
- `data.csv`: Sample CSV file with model names and their corresponding metrics. | ||
- `Figures/radar_chart/`: Folder where the radar charts will be saved. | ||
|
||
### Usage | ||
|
||
1. **Clone the repository:** | ||
|
||
```bash | ||
git clone https://github.com/EbrahimAlwajih/Radar-Diagram.git | ||
cd Radar-Diagram | ||
``` | ||
|
||
2. **Prepare your CSV file:** | ||
|
||
Ensure your CSV file (`data.csv`) has a structure where the first column contains the model names, and the subsequent columns contain the values for the specified categories. | ||
|
||
Example of the `data.csv` structure: | ||
|
||
```csv | ||
model,MAE,MSE,RMSE,R2,MedAE,EV,MBD,Adj_R2 | ||
Model1,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8 | ||
Model2,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9 | ||
``` | ||
|
||
3. **Run the script:** | ||
|
||
Execute the script to generate the radar charts: | ||
|
||
```bash | ||
python RadarChart.py | ||
``` | ||
|
||
The radar charts will be saved as SVG files in the `Figures/radar_chart/` directory with filenames corresponding to the model names from the CSV file. | ||
|
||
### Customization | ||
|
||
- **Categories:** | ||
You can customize the categories for the radar charts by modifying the `categories` list in the script. | ||
|
||
```python | ||
categories = ['MAE', 'MSE', 'RMSE', 'R2', 'MedAE', 'EV', 'MBD', 'Adj_R2'] | ||
``` | ||
|
||
- **Folder Path:** | ||
You can specify a different folder path to save the radar charts by changing the `folder_path` variable. | ||
|
||
```python | ||
folder_path = './Figures/radar_chart' | ||
``` | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. | ||
|
||
## Contributing | ||
|
||
Contributions are welcome! Please feel free to submit a Pull Request. | ||
|
||
## Contact | ||
|
||
If you have any questions, feel free to reach out to the repository owner. |