A radar chart is a graphical representation used to display multivariate data in the form of a two-dimensional chart. It consists of a central point from which multiple axes radiate outwards, each representing a different variable. The data points for each variable are plotted on these axes and connected to form a polygon. Radar charts are commonly used to compare the performance, characteristics, or attributes of different items or entities, allowing for an intuitive visualization of strengths and weaknesses across multiple dimensions simultaneously. This type of chart is particularly useful in areas such as performance analysis, project management, and strategic planning.
This repository contains the code for creating radar charts 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.
- 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.
Ensure you have the following Python packages installed:
matplotlib
pandas
You can install these packages using pip
:
pip install matplotlib pandas
RadarChart.py
: Contains theRadarChart
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.
-
Clone the repository:
git clone https://github.com/EbrahimAlwajih/Radar-Chart.git cd Radar-Chart
-
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: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
-
Run the script:
Execute the script to generate the radar charts:
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.
-
Categories: You can customize the categories for the radar charts by modifying the
categories
list in the script.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.folder_path = './Figures/radar_chart'
This Code is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you have any questions, feel free to reach out to the repository owner.