ml-graphy
A simple and elegant Python package for visualizing machine learning training metrics. ml-graphy automatically detects training and validation data to generate clean, publication-ready plots with just one line of code.
Key Features
- Automatic Metric Detection: Intelligently finds
loss,accuracy,val_loss, andval_accuracyin your model's history. - Publication-Ready Plots: Creates beautiful, clean plots using Seaborn styling.
- Simple API: Generate insightful visualizations with a single function call.
- Training Summary: Prints a concise summary of final training and validation metrics.
Installation
Install ml-graphy directly from PyPI:
pip install ml-graphy
This will automatically install the required dependencies: matplotlib and seaborn.
Quick Start
Using ml-graphy is straightforward. Just import the plot_metrics function and pass it your trained model object that contains a history attribute.
from mlgraphy.plotting import plot_metrics
# Create a mock model with a history attribute
class MockModel:
def __init__(self):
self.history = {
'loss': [0.8, 0.6, 0.4, 0.3, 0.2],
'accuracy': [0.6, 0.7, 0.8, 0.85, 0.9],
'val_loss': [0.9, 0.7, 0.5, 0.4, 0.3],
'val_accuracy': [0.55, 0.65, 0.75, 0.8, 0.85]
}
# Create an instance and plot the metrics
model = MockModel()
plot_metrics(model)
This will generate and display side-by-side plots for loss and accuracy.
What's Next?
The current version of ml-graphy focuses on simplicity and core functionality. Future releases will introduce more advanced features to provide greater flexibility and insight into your model's performance. We are actively working on expanding the library's capabilities to support a wider range of visualization needs.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for ml-graphy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ml_graphy-0.1.1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ml_graphy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / ml_graphy-0.1.1.tar.gz
| Download URL | ml_graphy-0.1.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2d1799d8aba077d8eefb7885fcb13c2a0415ea2768e4f71ce189a123762d09b
|
|
BLAKE2b-256 checksum How to use checksums |
5b2f2fbb1dffe0acf59dc21755bd97c4a2cce49eaeaac145d129a73297733812
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / ml_graphy-0.1.1-py3-none-any.whl
| Download URL | ml_graphy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8add8ffcea22316cbdfed0e3d631d8a97615558ed1ff1cdf6a65145d38770c80
|
|
BLAKE2b-256 checksum How to use checksums |
db1d28c4c0079089fb946556dbbcc01a2a7a9c22c0e62b534941c4befb651163
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|