# ParameterSpace
[![Actions Status](https://github.com/boschresearch/parameterspace/workflows/ci-cd-pipeline/badge.svg)](https://github.com/boschresearch/parameterspace/actions)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/parameterspace)](https://pypi.org/project/parameterspace/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/parameterspace)](https://pypi.org/project/parameterspace/)
[![License: Apache-2.0](https://img.shields.io/github/license/boschresearch/parameterspace)](https://github.com/boschresearch/parameterspace/blob/main/LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
**Contents:**
- [About](#about)
- [Installation](#installation)
- [Development](#development)
- [Prerequisites](#prerequisites)
- [Setup environment](#setup-environment)
- [Running Tests](#running-tests)
- [Building Documentation](#building-documentation)
- [License](#license)
## About
A package to define parameter spaces consisting of mixed types (continuous, integer,
categorical) with conditions and priors. It allows for easy specification of the
parameters and their dependencies. The `ParameterSpace` object can then be used to
sample random configurations from the prior and convert any valid configuration
into a numerical representation. This numerical representation has the following
properties:
- it results in a Numpy `ndarray` of type `float64`
- transformed representation between 0 and 1 (uniform) including integers, ordinal and
categorical parameters
- inactive parameters are masked as `numpy.nan` values
This allows to easily use optimizers that expect continuous domains to be used on more
complicated problems because `parameterspace` can convert any numerical vector
representation inside the unit hypercube into a valid configuration. The function might
not be smooth, but for robust methods (like genetic algorithms/evolutionary strategies)
this might still be valuable.
This software is a research prototype. The software is not ready for production use. It
has neither been developed nor tested for a specific use case. However, the license
conditions of the applicable Open Source licenses allow you to adapt the software to
your needs. Before using it in a safety relevant setting, make sure that the software
fulfills your requirements and adjust it according to any applicable safety standards
(e.g. ISO 26262).
## Documentation
**Visit [boschresearch.github.io/parameterspace](https://boschresearch.github.io/parameterspace/)**
## Installation
The `parameterspace` package can be installed from [pypi.org](https://pypi.org):
```
pip install parameterspace
```
## Development
### Prerequisites
- Python >= 3.8
- [Poetry](https://python-poetry.org/docs/#installation)
### Setup environment
To install the package and its dependencies for development run:
```
poetry install
```
Optionally install [pre-commit](https://pre-commit.com) hooks to check code standards
before committing changes:
```
poetry run pre-commit install
```
### Running Tests
The tests are located in the `./tests` folder. The [pytest](https://pytest.org)
framework is used for running them. To run the tests:
```
poetry run pytest ./tests
```
### Building Documentation
To built documentation run from the repository root:
```
poetry run mkdocs build --clean
```
For serving it locally while working on the documentation run:
```
poetry run mkdocs serve
```
## Architectural Decision Records
### Parameter Names
**In the context of** naming parameters and using their name to fix them to constant
values or condition on them via `lambda` expressions,
**facing that** only valid Python variable names can be used in conditions, and that
fixing parameters that do not have a valid parameter name can only be done like
`fix(**{"invalid-variable:name": "const"})`
**we decided for** requiring all parameter names to be valid Python variable names
**to achieve** early failure and communication of that convention to avoid surprises
when fixing and using conditions down the line, accepting that this rules out common
parameter names like `lambda` and might require explicit translation between from and to
contexts that require incompatible names (e.g. predefined benchmarks).
## License
`parameterspace` is open-sourced under the Apache-2.0 license. See the
[LICENSE](LICENSE) file for details.
For a list of other open source components included in `parameterspace`, see the file
[3rd-party-licenses.txt](3rd-party-licenses.txt).
Raw data
{
"_id": null,
"home_page": "https://github.com/boschresearch/parameterspace",
"name": "parameterspace",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Bosch Center for AI, Robert Bosch GmbH",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/87/ec/473761a9831f6823f4b3c72c034f7d6037df9856ed6c89235090c0c729a7/parameterspace-0.10.0.tar.gz",
"platform": null,
"description": "# ParameterSpace\n\n[![Actions Status](https://github.com/boschresearch/parameterspace/workflows/ci-cd-pipeline/badge.svg)](https://github.com/boschresearch/parameterspace/actions)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/parameterspace)](https://pypi.org/project/parameterspace/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/parameterspace)](https://pypi.org/project/parameterspace/)\n[![License: Apache-2.0](https://img.shields.io/github/license/boschresearch/parameterspace)](https://github.com/boschresearch/parameterspace/blob/main/LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n**Contents:**\n\n- [About](#about)\n- [Installation](#installation)\n- [Development](#development)\n - [Prerequisites](#prerequisites)\n - [Setup environment](#setup-environment)\n - [Running Tests](#running-tests)\n - [Building Documentation](#building-documentation)\n- [License](#license)\n\n## About\n\nA package to define parameter spaces consisting of mixed types (continuous, integer,\ncategorical) with conditions and priors. It allows for easy specification of the\nparameters and their dependencies. The `ParameterSpace` object can then be used to\nsample random configurations from the prior and convert any valid configuration\ninto a numerical representation. This numerical representation has the following\nproperties:\n\n- it results in a Numpy `ndarray` of type `float64`\n- transformed representation between 0 and 1 (uniform) including integers, ordinal and\n categorical parameters\n- inactive parameters are masked as `numpy.nan` values\n\nThis allows to easily use optimizers that expect continuous domains to be used on more\ncomplicated problems because `parameterspace` can convert any numerical vector\nrepresentation inside the unit hypercube into a valid configuration. The function might\nnot be smooth, but for robust methods (like genetic algorithms/evolutionary strategies)\nthis might still be valuable.\n\nThis software is a research prototype. The software is not ready for production use. It\nhas neither been developed nor tested for a specific use case. However, the license\nconditions of the applicable Open Source licenses allow you to adapt the software to\nyour needs. Before using it in a safety relevant setting, make sure that the software\nfulfills your requirements and adjust it according to any applicable safety standards\n(e.g. ISO 26262).\n\n## Documentation\n\n**Visit [boschresearch.github.io/parameterspace](https://boschresearch.github.io/parameterspace/)**\n\n\n## Installation\n\nThe `parameterspace` package can be installed from [pypi.org](https://pypi.org):\n\n```\npip install parameterspace\n```\n\n## Development\n\n### Prerequisites\n\n- Python >= 3.8\n- [Poetry](https://python-poetry.org/docs/#installation)\n\n### Setup environment\n\nTo install the package and its dependencies for development run:\n\n```\npoetry install\n```\n\nOptionally install [pre-commit](https://pre-commit.com) hooks to check code standards\nbefore committing changes:\n\n```\npoetry run pre-commit install\n```\n\n### Running Tests\n\nThe tests are located in the `./tests` folder. The [pytest](https://pytest.org)\nframework is used for running them. To run the tests:\n\n```\npoetry run pytest ./tests\n```\n\n### Building Documentation\n\nTo built documentation run from the repository root:\n\n```\npoetry run mkdocs build --clean\n```\n\nFor serving it locally while working on the documentation run:\n\n```\npoetry run mkdocs serve\n```\n\n## Architectural Decision Records\n\n### Parameter Names\n\n**In the context of** naming parameters and using their name to fix them to constant\nvalues or condition on them via `lambda` expressions,\n**facing that** only valid Python variable names can be used in conditions, and that\nfixing parameters that do not have a valid parameter name can only be done like\n`fix(**{\"invalid-variable:name\": \"const\"})`\n**we decided for** requiring all parameter names to be valid Python variable names\n**to achieve** early failure and communication of that convention to avoid surprises\nwhen fixing and using conditions down the line, accepting that this rules out common\nparameter names like `lambda` and might require explicit translation between from and to\ncontexts that require incompatible names (e.g. predefined benchmarks).\n\n## License\n\n`parameterspace` is open-sourced under the Apache-2.0 license. See the\n[LICENSE](LICENSE) file for details.\n\nFor a list of other open source components included in `parameterspace`, see the file\n[3rd-party-licenses.txt](3rd-party-licenses.txt).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Parametrized hierarchical spaces with flexible priors and transformations.",
"version": "0.10.0",
"project_urls": {
"Homepage": "https://github.com/boschresearch/parameterspace",
"Repository": "https://github.com/boschresearch/parameterspace"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4cd63edbeadea8cbaf1694299446e70b833e65a3bd2c0ccf1e25cb18aec9ae63",
"md5": "44801642ae78624601498034cbdff918",
"sha256": "3b8b4c078f5ccfef69ff870da957b21ec548709da6efa78373585a82d4b05c70"
},
"downloads": -1,
"filename": "parameterspace-0.10.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "44801642ae78624601498034cbdff918",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 36351,
"upload_time": "2023-05-30T13:13:43",
"upload_time_iso_8601": "2023-05-30T13:13:43.394782Z",
"url": "https://files.pythonhosted.org/packages/4c/d6/3edbeadea8cbaf1694299446e70b833e65a3bd2c0ccf1e25cb18aec9ae63/parameterspace-0.10.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "87ec473761a9831f6823f4b3c72c034f7d6037df9856ed6c89235090c0c729a7",
"md5": "5b8278ada3b9ffe60e95d29d9d81cffe",
"sha256": "695693d4a253d6a9d2b3b5e985c94f9d4b29764624a0a6cbd8dcd321218e9629"
},
"downloads": -1,
"filename": "parameterspace-0.10.0.tar.gz",
"has_sig": false,
"md5_digest": "5b8278ada3b9ffe60e95d29d9d81cffe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 25719,
"upload_time": "2023-05-30T13:13:45",
"upload_time_iso_8601": "2023-05-30T13:13:45.095475Z",
"url": "https://files.pythonhosted.org/packages/87/ec/473761a9831f6823f4b3c72c034f7d6037df9856ed6c89235090c0c729a7/parameterspace-0.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-30 13:13:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "boschresearch",
"github_project": "parameterspace",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "parameterspace"
}