Package: parameterspace
ParameterSpaceContents:AboutInstallationDevelopmentPrerequisitesSetup environmentRunning TestsBuilding DocumentationLicenseAboutA 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. TheParameterSpaceobject 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 Numpyndarrayof typefloat64transformed representation between 0 and 1 (uniform) including integers, ordinal and
categorical parametersinactive parameters are masked asnumpy.nanvaluesThis allows to easily use optimizers that expect continuous domains to be used on more
complicated problems becauseparameterspacecan 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).DocumentationVisitboschresearch.github.io/parameterspaceInstallationTheparameterspacepackage can be installed frompypi.org:pip install parameterspaceDevelopmentPrerequisitesPython >= 3.8PoetrySetup environmentTo install the package and its dependencies for development run:poetry installOptionally installpre-commithooks to check code standards
before committing changes:poetry run pre-commit installRunning TestsThe tests are located in the./testsfolder. Thepytestframework is used for running them. To run the tests:poetry run pytest ./testsBuilding DocumentationTo built documentation run from the repository root:poetry run mkdocs build --cleanFor serving it locally while working on the documentation run:poetry run mkdocs serveArchitectural Decision RecordsParameter NamesIn the context ofnaming parameters and using their name to fix them to constant
values or condition on them vialambdaexpressions,facing thatonly 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 likefix(**{"invalid-variable:name": "const"})we decided forrequiring all parameter names to be valid Python variable namesto achieveearly 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 likelambdaand might require explicit translation between from and to
contexts that require incompatible names (e.g. predefined benchmarks).Licenseparameterspaceis open-sourced under the Apache-2.0 license. See theLICENSEfile for details.For a list of other open source components included inparameterspace, see the file3rd-party-licenses.txt.