par-coordinates


Namepar-coordinates JSON
Version 0.2 PyPI version JSON
download
home_pagehttps://github.com/tommaso-ferracci/Parallel_Coordinates_Plot
SummaryCreate parallel coordinates plots of the hyperparameter search
upload_time2024-03-26 18:39:09
maintainerNone
docs_urlNone
authorTommaso Ferracci
requires_pythonNone
licenseMIT
keywords parallel coordinates parallel-coordinates machine learning deep learninghyperparameter visualization plot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 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](https://wandb.ai/site)) 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](https://pypi.org/project/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:
```python
# 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):
<p align="middle">
  <img src="outputs/figures/random_search.png" width="100%"/>
</p>

## License
The package is freely available under MIT license. The code in `src/par_coordinates/plot.py` is based on [pcp](https://github.com/gregornickel/pcp).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tommaso-ferracci/Parallel_Coordinates_Plot",
    "name": "par-coordinates",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "parallel coordinates, parallel-coordinates, machine learning, deep learninghyperparameter, visualization, plot",
    "author": "Tommaso Ferracci",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/99/ae/c8b6a2fb21f519921848a2674923f87cd7b40a6806250d2de3c425277510/par_coordinates-0.2.tar.gz",
    "platform": null,
    "description": "## Introduction\nParallel 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](https://wandb.ai/site)) 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`.\n\n## Installation\nThe package is available at [par-coordinates](https://pypi.org/project/par-coordinates/) and can be installed via:\n```\npip install par-coordinates\n```\n## Tutorial\nThe jupyter notebook `analyses/tutorial.ipynb` contains detailed examples of the package being used:\n- random search in `keras_tuner` for a multilayer perceptron\n- grid search and random search in `sklearn` for a random forest classifier\n- Bayesian optimization in `optuna` for a XGBoost regressor\n\nThe workflow is always the same:\n```python\n# import package\nfrom par_coordinates import get_results\nfrom par_coordinates import plot_par_coordinates\n# get results dataframe for specific tuner\nresults = get_results.sklearn(random_search, \"f1\")\n# display parallel coordinates plot\nfig = plot_par_coordinates(results, labels=[\"maximum tree depth\", \"minimum samples in leaf node\", \n                           \"number of trees\", \"F1 score\"], figsize=(8, 4), curves=True, \n                           linewidth=0.8, alpha=0.8, cmap=plt.get_cmap(\"copper\"))\n```\nresulting in the following visualization (with room for customization):\n<p align=\"middle\">\n  <img src=\"outputs/figures/random_search.png\" width=\"100%\"/>\n</p>\n\n## License\nThe package is freely available under MIT license. The code in `src/par_coordinates/plot.py` is based on [pcp](https://github.com/gregornickel/pcp).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Create parallel coordinates plots of the hyperparameter search",
    "version": "0.2",
    "project_urls": {
        "Homepage": "https://github.com/tommaso-ferracci/Parallel_Coordinates_Plot",
        "Source": "https://github.com/tommaso-ferracci/Parallel_Coordinates_Plots"
    },
    "split_keywords": [
        "parallel coordinates",
        " parallel-coordinates",
        " machine learning",
        " deep learninghyperparameter",
        " visualization",
        " plot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "701fd7ff3dadd2c228b3f1ef3e49958f0509b96956fd1f858e919cb097dfa11c",
                "md5": "bc212862e469530fbdbb1e0c097efa12",
                "sha256": "b4233058bb182176f8d2af606cd183535b15d183addd6e7a87a026cc2707347a"
            },
            "downloads": -1,
            "filename": "par_coordinates-0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc212862e469530fbdbb1e0c097efa12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6964,
            "upload_time": "2024-03-26T18:39:08",
            "upload_time_iso_8601": "2024-03-26T18:39:08.581299Z",
            "url": "https://files.pythonhosted.org/packages/70/1f/d7ff3dadd2c228b3f1ef3e49958f0509b96956fd1f858e919cb097dfa11c/par_coordinates-0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99aec8b6a2fb21f519921848a2674923f87cd7b40a6806250d2de3c425277510",
                "md5": "dd1cb77ee4cad7193214326d5cf93e7a",
                "sha256": "7100c4a13156cdec7bbe3be422336e2c924998e56668fd9d6934e3771953cbde"
            },
            "downloads": -1,
            "filename": "par_coordinates-0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "dd1cb77ee4cad7193214326d5cf93e7a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6279,
            "upload_time": "2024-03-26T18:39:09",
            "upload_time_iso_8601": "2024-03-26T18:39:09.929422Z",
            "url": "https://files.pythonhosted.org/packages/99/ae/c8b6a2fb21f519921848a2674923f87cd7b40a6806250d2de3c425277510/par_coordinates-0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-26 18:39:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tommaso-ferracci",
    "github_project": "Parallel_Coordinates_Plot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "par-coordinates"
}
        
Elapsed time: 0.23865s