queens.parameters package#
Parameters.
Modules grouping deterministic and continuous random variables or random fields.
Subpackages#
- queens.parameters.random_fields package
- Submodules
- queens.parameters.random_fields.fourier module
DimensionMethods1DDimensionMethods2DDimensionMethods3DFourierFourier.meanFourier.stdFourier.corr_lengthFourier.variabilityFourier.trunc_thresholdFourier.basis_dimensionFourier.latent_indexFourier.covariance_indexFourier.covarianceFourier.basisFourier.coordinatesFourier.field_dimensionFourier.number_expansion_termsFourier.dimensionFourier.convex_hull_sizeFourier.__init__()Fourier.check_convergence()Fourier.draw()Fourier.expanded_representation()Fourier.grad_logpdf()Fourier.latent_gradient()Fourier.logpdf()
- queens.parameters.random_fields.karhunen_loeve module
KarhunenLoeveKarhunenLoeve.nugget_varianceKarhunenLoeve.explained_varianceKarhunenLoeve.stdKarhunenLoeve.corr_lengthKarhunenLoeve.cut_offKarhunenLoeve.meanKarhunenLoeve.cov_matrixKarhunenLoeve.eigenbasisKarhunenLoeve.eigenvaluesKarhunenLoeve.eigenvectorsKarhunenLoeve.dimensionKarhunenLoeve.__init__()KarhunenLoeve.calculate_covariance_matrix()KarhunenLoeve.draw()KarhunenLoeve.eigendecomp_cov_matrix()KarhunenLoeve.expanded_representation()KarhunenLoeve.grad_logpdf()KarhunenLoeve.latent_gradient()KarhunenLoeve.logpdf()
- queens.parameters.random_fields.piece_wise module
Submodules#
queens.parameters.parameters module#
Parameters.
- class HasGradLogPDF[source]#
Bases:
ProtocolDummy class to check if an object has a gradient log-PDF function.
- __init__(*args, **kwargs)#
- class HasPPF[source]#
Bases:
ProtocolDummy class to check if an object has a percent point function.
- __init__(*args, **kwargs)#
- class Parameters[source]#
Bases:
objectParameters class.
- dict#
Random variables and random fields stored in a dict.
- parameters_keys#
List of keys for all parameter members.
- num_parameters#
Number of (truncated) parameters.
- random_field_flag#
Specifies if random fields are used.
- names#
Parameter names.
- __init__(**parameters)[source]#
Initialize Parameters object.
- Parameters:
**parameters (Continuous | Discrete | RandomField) – Parameters as keyword arguments
- Return type:
None
- dict_as_sample(sample_dict)[source]#
Opposite of sample_as_dict: Convert sample_dict to sample array.
- Parameters:
sample_dict (dict) – dict containing the sample. The keys must correspond to parameter keys. The order of the keys does not matter.
- Returns:
sample – sample array in correct order
- Return type:
ndarray
- draw_samples(num_samples)[source]#
Draw samples from all parameters.
- Parameters:
num_samples (int) – The number of samples to draw for each parameter.
- Returns:
Drawn samples
- Return type:
ndarray
- expand_random_field_realization(truncated_sample)[source]#
Expand truncated representation of random fields.
- Parameters:
truncated_sample (ndarray) – Truncated representation of sample
- Returns:
sample_expanded – Expanded representation of sample
- Return type:
ndarray
- grad_joint_logpdf(samples)[source]#
Evaluate the gradient of the joint log-PDF w.r.t. the samples.
- Parameters:
samples (ndarray) – Samples for which to evaluate the gradient of the joint log-PDF. Each row represents a sample and each column corresponds to a parameter dimension.
- Returns:
Gradient of the joint log-PDF w.r.t. the samples
- Return type:
ndarray
- inverse_cdf_transform(samples)[source]#
Transform samples to unit interval.
- Parameters:
samples (ndarray) – Samples that should be transformed.
- Returns:
Transformed samples
- Return type:
ndarray
- joint_logpdf(samples)[source]#
Evaluate the log-PDF summed over all parameters.
- Parameters:
samples (ndarray) – Samples for which to evaluate the joint log-PDF. Each row represents a sample and each column corresponds to a parameter dimension.
- Returns:
Log-PDF summed over all parameters
- Return type:
ndarray
- latent_grad(upstream_gradient)[source]#
Gradient of the rvs and rfs w.r.t. latent variables.
- Parameters:
upstream_gradient (ndarray) – Upstream gradient
- Returns:
Gradient of the joint rvs/rfs w.r.t. the samples
- Return type:
ndarray
- sample_as_dict(sample)[source]#
Return sample as a dict.
- Parameters:
sample (ndarray) – A single sample
- Returns:
sample_dict – Dictionary containing sample members and the corresponding parameter keys
- Return type:
dict