Skip to main content

ParameterSpace

Actions Status PyPI - Wheel PyPI - Python Version License: Apache-2.0 Code style: black

Contents:

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

Installation

The parameterspace package can be installed from pypi.org:

pip install parameterspace

Development

Prerequisites

Setup environment

To install the package and its dependencies for development run:

poetry install

Optionally install pre-commit 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 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 file for details.

For a list of other open source components included in parameterspace, see the file 3rd-party-licenses.txt.

Metadata

Release files for parameterspace 0.10.2

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

Source distribution (sdist)

Source distribution for parameterspace 0.10.2
File Size Uploaded
parameterspace-0.10.2.tar.gz 25.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for parameterspace 0.10.2
File Interpreter ABI Platform
parameterspace-0.10.2-py3-none-any.whl Python 3 none any Details

Total release size: 62.8 kB

Release files / parameterspace-0.10.2.tar.gz

Download URL parameterspace-0.10.2.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
88e5069df585d78e65ee61aaa87fa53476581fd2d1b5f64084544e2860a8d3fa
BLAKE2b-256 checksum
How to use checksums
7d7abd98bcf03897cbfbeee1d183494128a7888e01d3997ca7690b98b9a90b56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1018-azure

Release files / parameterspace-0.10.2-py3-none-any.whl

Download URL parameterspace-0.10.2-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a13361fe961f461c9517c3ceb8a1f1dadb815857be73e8d641d62402ebda6f15
BLAKE2b-256 checksum
How to use checksums
d0a628a0005fdcb69d5740a26ea1f0c64f08e6b916fbe526bc725223a507e402
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.5 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

0.10.2 This release

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.20

2 release files

0.7.18

2 release files

0.7.17

2 release files

0.7.16

2 release files

0.7.13

2 release files

0.7.12

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