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.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.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:
objectParameters 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