Create plots and graphs for your Machine Learning projects.
Project description
Plots and graphs
Save your time. Create plots and graphs that look nice.
The repository will contain a collection of useful, useable, and reuseable plots and graphs.
I know, ChatGPT is your friend and helper and with the right prompt can create any graph you would like to have. However, it is very helpful to configure everything once and properly and only finetune the detail is necessary.
So there is a collection for different types of plots and graphs. Some might be great for visualizing data in general such as raincloud graphs or ridgeline plots while others might be more suitable for specific use cases. These could include visualizing the results for a binary classifier, for which plots such as a confusion matrix or a callibration plot can be created.
Overview of graphs and plots
TBD!
-
binary classifier
- Accuracy
- Calibration Curve
- Classification Report
- Confusion Matrix
- ROC curve (AUROC)
- y_prob histogram
-
comparing distributions
- raincloud plot
Gallery
TBD! Here, each new plot should be rendered and included as a small reference.
Calibration Curve | Classification Report | Confusion Matrix |
ROC Curve (AUROC) | ROC Curve (AUROC) with bootstrapping | y_prob histogram |
Raincloud |
Other resources
Why create everything from scratch, if some things exist already? Here are some helpful resources.
- Python Graph Gallery - great collection of graphs. First look at their gallery, then check out their 'BEST' collection for inspiration.
- Scientific Visualization Book - definitely check out the first part for essential tips for good graphs. And deep dive further to improve your visualization game.
- CHARTIO - must read on how to choose colors and color palettes.
How to use
TBD: How to use the functions. What is their standardization? How can a figure be altered?
Install the package (currently).
pip install -e .
Install the package (in the future).
pip install plotsandgraphs
Example usage for a calibration curve.
import plotsandgraphs
import matplotlib.pyplot as plt
import numpy as np
# create some data
n_samples = 1000
y_prob = np.random.uniform(0, 1, n_samples) # the probability of class 1 predictions
y_true = np.random.choice([0,1], n_samples) # the actually corresponding class labels
# create figure
fig_auroc = plotsandgraphs.binary_classifier.plot_calibration_curve(y_prob, y_true, save_fig_path=None)
# customize figure
axes = fig_auroc.get_axes()
ax0 = axes[0]
ax0.set_title('New Title for Calibration Plot')
# save figure
fig.savefig('calibration_plot.png', bbox_inches='tight')
Requirements
Show all requirements
Contributors
- DALL-E 3 created the project logo on 17th October 2023. Prompt used: Illustration of a stylized graph with colorful lines and bars, representing data visualization, suitable for a project logo named 'plots and graphs'.
Reference
Of course we are happy to be mentioned in any way, if our repository has helped you. You can also share this repository with your friends and collegues to make their lives easier. Cheers!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file plotsandgraphs-0.1.1.tar.gz
.
File metadata
- Download URL: plotsandgraphs-0.1.1.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52a2527cb21199d6a4d99dcf54181e5dcc3b2d9a83f491c6b2b0a4656c0e8f4 |
|
MD5 | 6f7bedff86fc4c180248870e5ca3853e |
|
BLAKE2b-256 | 15ebea87ca26f6e11f1185e37eb0c44bb066e4a459b33ab88552082f448055c1 |
Provenance
File details
Details for the file plotsandgraphs-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: plotsandgraphs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ffef500a06a123f01852bdb24b87db25527cc14c39e8972cba11236a82fb7c7 |
|
MD5 | 7cef17f3f0d202acdd3e3650a1f81db2 |
|
BLAKE2b-256 | 1c6633d43442b34e96a48a8c99b9f7ed3cd0643a16f533da42f7c7cd58e775e0 |