Configuration¶
- class probnum._config.Configuration[source]¶
Bases:
objectConfiguration by which some mechanics of ProbNum can be controlled dynamically.
ProbNum provides some configurations together with default values. These are listed in the tables below. Additionally, users can register their own configuration entries via
register(). Configuration entries can only be registered once and can only be used (accessed or overwritten) once they have been registered.Config Option
Default Value
Description
covariance_inversion_damping1e-12A (typically small) value that is per default added to the diagonal of covariance matrices in order to make inversion numerically stable.
matrix_freeFalseIf
True, wherever possible,LinearOperators are used instead of arrays.LinearOperators define a matrix-vector product implicitly without instantiating the full matrix in memory. This makes them memory- and runtime-efficient for linear algebra operations.lazy_matrix_matrix_matmulTrueIf this is set to
False, the matrix multiplication operator@applied to twoLinearOperators of typeMatrixmultiplies the two matrices immediately and returns the product as aMatrix. Otherwise, i.e. if this option is set toTrue, aProductLinearOperator, representing the matrix product, is returned. Multiplying a vector with theProductLinearOperatoris often more efficient than computing the full matrix-matrix product first. This is why this option is set toTrueby default.Examples
>>> import probnum >>> probnum.config.covariance_inversion_damping 1e-12 >>> with probnum.config( ... covariance_inversion_damping=1e-2, ... ): ... probnum.config.covariance_inversion_damping 0.01
Methods Summary
__call__(**kwargs)Context manager used to set values of registered config options.
register(key, default_value, description)Register a new configuration option.
Methods Documentation
- __call__(**kwargs)[source]¶
Context manager used to set values of registered config options.
- Return type:
None