# 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`, and `val_accuracy` in 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:
```bash
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.
```python
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](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "ml-graphy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "machine learning, deep learning, plotting, metrics, visualization",
"author": null,
"author_email": "Prasoon Rai <prasoonrai@icloud.com>",
"download_url": "https://files.pythonhosted.org/packages/5b/2f/2fbb1dffe0acf59dc21755bd97c4a2cce49eaeaac145d129a73297733812/ml_graphy-0.1.1.tar.gz",
"platform": null,
"description": "# ml-graphy\n\nA 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.\n\n## Key Features\n\n- **Automatic Metric Detection**: Intelligently finds `loss`, `accuracy`, `val_loss`, and `val_accuracy` in your model's history.\n- **Publication-Ready Plots**: Creates beautiful, clean plots using Seaborn styling.\n- **Simple API**: Generate insightful visualizations with a single function call.\n- **Training Summary**: Prints a concise summary of final training and validation metrics.\n\n## Installation\n\nInstall `ml-graphy` directly from PyPI:\n\n```bash\npip install ml-graphy\n```\n\nThis will automatically install the required dependencies: `matplotlib` and `seaborn`.\n\n## Quick Start\n\nUsing `ml-graphy` is straightforward. Just import the `plot_metrics` function and pass it your trained model object that contains a `history` attribute.\n\n```python\nfrom mlgraphy.plotting import plot_metrics\n\n# Create a mock model with a history attribute\nclass MockModel:\n def __init__(self):\n self.history = {\n 'loss': [0.8, 0.6, 0.4, 0.3, 0.2],\n 'accuracy': [0.6, 0.7, 0.8, 0.85, 0.9],\n 'val_loss': [0.9, 0.7, 0.5, 0.4, 0.3],\n 'val_accuracy': [0.55, 0.65, 0.75, 0.8, 0.85]\n }\n\n# Create an instance and plot the metrics\nmodel = MockModel()\nplot_metrics(model)\n```\n\nThis will generate and display side-by-side plots for loss and accuracy.\n\n## What's Next?\n\nThe 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.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for plotting machine learning training metrics",
"version": "0.1.1",
"project_urls": {
"Bug Reports": "https://github.com/Prasoon-Rai/ml-graphy/issues",
"Homepage": "https://github.com/Prasoon-Rai/ml-graphy",
"Source": "https://github.com/Prasoon-Rai/ml-graphy"
},
"split_keywords": [
"machine learning",
" deep learning",
" plotting",
" metrics",
" visualization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "db1d28c4c0079089fb946556dbbcc01a2a7a9c22c0e62b534941c4befb651163",
"md5": "899b260aedaeb74cfeb4eefecf665a2b",
"sha256": "8add8ffcea22316cbdfed0e3d631d8a97615558ed1ff1cdf6a65145d38770c80"
},
"downloads": -1,
"filename": "ml_graphy-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "899b260aedaeb74cfeb4eefecf665a2b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4510,
"upload_time": "2025-07-28T17:23:18",
"upload_time_iso_8601": "2025-07-28T17:23:18.332765Z",
"url": "https://files.pythonhosted.org/packages/db/1d/28c4c0079089fb946556dbbcc01a2a7a9c22c0e62b534941c4befb651163/ml_graphy-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5b2f2fbb1dffe0acf59dc21755bd97c4a2cce49eaeaac145d129a73297733812",
"md5": "445311f31c600f83923858fc146ae152",
"sha256": "c2d1799d8aba077d8eefb7885fcb13c2a0415ea2768e4f71ce189a123762d09b"
},
"downloads": -1,
"filename": "ml_graphy-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "445311f31c600f83923858fc146ae152",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4415,
"upload_time": "2025-07-28T17:23:19",
"upload_time_iso_8601": "2025-07-28T17:23:19.087908Z",
"url": "https://files.pythonhosted.org/packages/5b/2f/2fbb1dffe0acf59dc21755bd97c4a2cce49eaeaac145d129a73297733812/ml_graphy-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 17:23:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Prasoon-Rai",
"github_project": "ml-graphy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ml-graphy"
}