A Python package for plotting machine learning training metrics
Project description
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.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ml_graphy-0.1.1.tar.gz.
File metadata
- Download URL: ml_graphy-0.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2d1799d8aba077d8eefb7885fcb13c2a0415ea2768e4f71ce189a123762d09b
|
|
| MD5 |
445311f31c600f83923858fc146ae152
|
|
| BLAKE2b-256 |
5b2f2fbb1dffe0acf59dc21755bd97c4a2cce49eaeaac145d129a73297733812
|
File details
Details for the file ml_graphy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ml_graphy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8add8ffcea22316cbdfed0e3d631d8a97615558ed1ff1cdf6a65145d38770c80
|
|
| MD5 |
899b260aedaeb74cfeb4eefecf665a2b
|
|
| BLAKE2b-256 |
db1d28c4c0079089fb946556dbbcc01a2a7a9c22c0e62b534941c4befb651163
|