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
DimensionMethods1D
DimensionMethods2D
DimensionMethods3D
Fourier
Fourier.mean
Fourier.std
Fourier.corr_length
Fourier.variability
Fourier.trunc_threshold
Fourier.basis_dimension
Fourier.latent_index
Fourier.covariance_index
Fourier.covariance
Fourier.basis
Fourier.coordinates
Fourier.field_dimension
Fourier.number_expansion_terms
Fourier.dimension
Fourier.convex_hull_size
Fourier.check_convergence()
Fourier.draw()
Fourier.expanded_representation()
Fourier.grad_logpdf()
Fourier.latent_gradient()
Fourier.logpdf()
- queens.parameters.random_fields.karhunen_loeve module
KarhunenLoeve
KarhunenLoeve.nugget_variance
KarhunenLoeve.explained_variance
KarhunenLoeve.std
KarhunenLoeve.corr_length
KarhunenLoeve.cut_off
KarhunenLoeve.mean
KarhunenLoeve.cov_matrix
KarhunenLoeve.eigenbasis
KarhunenLoeve.eigenvalues
KarhunenLoeve.eigenvectors
KarhunenLoeve.dimension
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 Parameters(**parameters)[source]#
Bases:
object
Parameters class.
- dict#
Random variables and random fields stored in a dict.
- Type:
dict
- parameters_keys#
List of keys for all parameter members.
- Type:
list
- num_parameters#
Number of (truncated) parameters.
- Type:
int
- random_field_flag#
Specifies if random fields are used.
- Type:
bool
- names#
Parameter names.
- Type:
list
- draw_samples(num_samples)[source]#
Draw samples from all parameters.
- Parameters:
num_samples (int) – The number of samples to draw for each parameter.
- Returns:
samples (np.ndarray) – Drawn samples
- expand_random_field_realization(truncated_sample)[source]#
Expand truncated representation of random fields.
- Parameters:
truncated_sample (np.ndarray) – Truncated representation of sample
- Returns:
sample_expanded (np.ndarray) – Expanded representation of sample
- grad_joint_logpdf(samples)[source]#
Evaluate the gradient of the joint logpdf w.r.t. the samples.
- Parameters:
samples (np.ndarray) – Samples for which to evaluate the gradient of the joint logpdf. Each row represents a sample and each column corresponds to a parameter dimension.
- Returns:
grad_logpdf (np.ndarray) – Gradient of the joint logpdf w.r.t. the samples
- inverse_cdf_transform(samples)[source]#
Transform samples to unit interval.
- Parameters:
samples (np.ndarray) – Samples that should be transformed.
- Returns:
transformed_samples (np.ndarray) – Transformed samples
- joint_logpdf(samples)[source]#
Evaluate the logpdf summed over all parameters.
- Parameters:
samples (np.ndarray) – Samples for which to evaluate the joint logpdf. Each row represents a sample and each column corresponds to a parameter dimension.
- Returns:
logpdf (np.ndarray) – logpdf summed over all parameters
- latent_grad(upstream_gradient)[source]#
Gradient of the rvs and rfs w.r.t. latent variables.
- Parameters:
upstream_gradient (np.array) – Upstream gradient
- Returns:
gradient (np.ndarray) – Gradient of the joint rvs/rfs w.r.t. the samples
- sample_as_dict(sample)[source]#
Return sample as a dict.
- Parameters:
sample (np.ndarray) – A single sample
- Returns:
sample_dict (dict) – Dictionary containing sample members and the corresponding parameter
keys