Create parallel coordinates plots of the hyperparameter search
Project description
Introduction
Parallel coordinates plots are a convenient way of visualizing the hyperparameter search for machine learning and deep learning models. While many platforms for model development (see wandb) already include this kind of visualization, reproducing it in matplotlib for more advanced customization or publishing can be tricky. This package solves the issue by offering compatibility with the major frameworks for hyperparameter tuning. The current version supports keras_tuner, sklearn and optuna.
Installation
The package is available at par-coordinates and can be installed via:
pip install par-coordinates
Tutorial
The jupyter notebook analyses/tutorial.ipynb contains detailed examples of the package being used:
- random search in
keras_tunerfor a multilayer perceptron - grid search and random search in
sklearnfor a random forest classifier - Bayesian optimization in
optunafor a XGBoost regressor
The workflow is always the same:
# import package
from par_coordinates import get_results
from par_coordinates import plot_par_coordinates
# get results dataframe for specific tuner
results = get_results.sklearn(random_search, "f1")
# display parallel coordinates plot
fig = plot_par_coordinates(results, labels=["maximum tree depth", "minimum samples in leaf node",
"number of trees", "F1 score"], figsize=(8, 4), curves=True,
linewidth=0.8, alpha=0.8, cmap=plt.get_cmap("copper"))
resulting in the following visualization (with room for customization):
For additional information the official documentation is available here.
License
The package is freely available under MIT license. The code in src/par_coordinates/plot.py is based on pcp.
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 par_coordinates-0.3.tar.gz.
File metadata
- Download URL: par_coordinates-0.3.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f3d069ea49235ae46616af1d0a1c18620c110006c0dc56a1df3151c94453e60
|
|
| MD5 |
ac5d04830224d8829007965f19daef14
|
|
| BLAKE2b-256 |
4ced3fe8a36641f3210b89a78e6726205d0b9489181c2b81c7be1eaa1edeb2de
|
File details
Details for the file par_coordinates-0.3-py3-none-any.whl.
File metadata
- Download URL: par_coordinates-0.3-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5376919d98dea066d3404a85442b7f48589be0afebd78408f4cbe80d3e5984c8
|
|
| MD5 |
767b40fa0056c6edbc1c45a5279d83b6
|
|
| BLAKE2b-256 |
222cd42aa256be21cd3005dcb70642bbbedec0c528044484554df7fe511d8417
|