Skip to main content

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_tuner for a multilayer perceptron
  • grid search and random search in sklearn for a random forest classifier
  • Bayesian optimization in optuna for 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.

Release files for par-coordinates 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for par-coordinates 0.3
File Size Uploaded
par_coordinates-0.3.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for par-coordinates 0.3
File Interpreter ABI Platform
par_coordinates-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / par_coordinates-0.3.tar.gz

Download URL par_coordinates-0.3.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5f3d069ea49235ae46616af1d0a1c18620c110006c0dc56a1df3151c94453e60
BLAKE2b-256 checksum
How to use checksums
4ced3fe8a36641f3210b89a78e6726205d0b9489181c2b81c7be1eaa1edeb2de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.0

Release files / par_coordinates-0.3-py3-none-any.whl

Download URL par_coordinates-0.3-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5376919d98dea066d3404a85442b7f48589be0afebd78408f4cbe80d3e5984c8
BLAKE2b-256 checksum
How to use checksums
222cd42aa256be21cd3005dcb70642bbbedec0c528044484554df7fe511d8417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page