Dakota  Version 6.19
Explore and Predict with Confidence
Classes | Typedefs | Functions
dakota::surrogates Namespace Reference

namespace for new Dakota surrogates module More...

Classes

class  GaussianProcess
 The GaussianProcess constructs a Gaussian Process regressor surrogate given a matrix of data. More...
 
class  GP_Objective
 ROL objective function for the Gaussian Process (GP) surrogate. More...
 
class  Kernel
 Kernel functions for the Gaussian Process surrogate. More...
 
class  Matern32Kernel
 Stationary kernel with C^1 smooth realizations. More...
 
class  Matern52Kernel
 Stationary kernel with C^2 smooth realizations. More...
 
class  PolynomialRegression
 The PolynomialRegression class constructs a polynomial regressor using ordinary least squares. More...
 
class  SquaredExponentialKernel
 Stationary kernel with C^\infty smooth realizations. More...
 
class  Surrogate
 Parent class for surrogate models. More...
 

Typedefs

using RolVec = ROL::Vector< double >
 Dakota alias for ROL Vector.
 
using RolStdVec = ROL::StdVector< double >
 Dakota alias for ROL StdVector.
 
using SCALER_TYPE = util::DataScaler::SCALER_TYPE
 alias for util SCALER_TYPE enum
 
using SOLVER_TYPE = util::LinearSolverBase::SOLVER_TYPE
 alias for util SOLVER_TYPE enum
 

Functions

void compute_next_combination (int num_dims, int level, VectorXi &index, bool &extend, int &h, int &t)
 
void size_level_index_vector (int num_dims, int level, MatrixXi &indices)
 Compute a matrix of basis indices for given dimension and level. Each row of the matrix sums to level. More...
 
void compute_hyperbolic_subdim_level_indices (int num_dims, int level, int num_active_dims, double p, MatrixXi &indices)
 Compute a matrix of indices for a submatrix (i.e. up to the active dimensions column) of indices produced by size_level_index_vector(num_dims, level, indices) where each feature has a component > 0 and respects the p-norm cutoff. More...
 
void compute_hyperbolic_level_indices (int num_dims, int level, double p, MatrixXi &indices)
 Compute the hyperbolic cross indices for a given level. More...
 
void compute_hyperbolic_indices (int num_dims, int level, double p, MatrixXi &indices)
 Compute the hyperbolic cross indices for all levels up to level. More...
 
void compute_reduced_indices (int num_dims, int level, MatrixXi &indices)
 Compute the reduced indices for all levels up to level. More...
 
void fd_check_gradient (Surrogate &surr, const MatrixXd &sample, MatrixXd &fd_error, const int num_steps=10)
 Perform a centered finite difference check of a Surrogate's gradient method. More...
 
void fd_check_hessian (Surrogate &surr, const MatrixXd &sample, MatrixXd &fd_error, const int num_steps=10)
 Perform a centered finite difference check of a Surrogate's Hessian method. More...
 
std::vector< MatrixXdcompute_cw_dists_squared (const std::vector< MatrixXd > &cw_dists)
 Compute a vector of component-wise squared distances from a vector of component-wise signed distances. More...
 
std::shared_ptr< Kernelkernel_factory (const std::string &kernel_type)
 Creates a derived Kernel class. More...
 

Detailed Description

namespace for new Dakota surrogates module

Function Documentation

◆ compute_next_combination()

void compute_next_combination ( int  num_dims,
int  level,
VectorXi index,
bool &  extend,
int &  h,
int &  t 
)
Parameters
[in]num_dimsDimension of the feature space.
[in]levelTotal order in each row of indices. Should be >= 1.
[in,out]indexVector of ints that specifies the powers for each term in the basis.
[in,out]extendBool for whether to continue with the computation of basis indices.
[in,out]hWorking variable for basis enumeration.
[in,out]tWorking variable for basis enumeration.

Referenced by size_level_index_vector().

◆ size_level_index_vector()

void size_level_index_vector ( int  num_dims,
int  level,
MatrixXi indices 
)

Compute a matrix of basis indices for given dimension and level. Each row of the matrix sums to level.

Parameters
[in]num_dimsDimension of the feature space.
[in]levelTotal order in each row of indices. Should be >= 1.
[out]indicesMatrix of indices - (num_terms by num_dims).

References compute_next_combination(), and dakota::util::n_choose_k().

Referenced by compute_hyperbolic_level_indices(), and compute_hyperbolic_subdim_level_indices().

◆ compute_hyperbolic_subdim_level_indices()

void compute_hyperbolic_subdim_level_indices ( int  num_dims,
int  level,
int  num_active_dims,
double  p,
MatrixXi indices 
)

Compute a matrix of indices for a submatrix (i.e. up to the active dimensions column) of indices produced by size_level_index_vector(num_dims, level, indices) where each feature has a component > 0 and respects the p-norm cutoff.

Parameters
[in]num_dimsDimension of the feature space.
[in]levelTotal order in each row of indices. Should be >= 1.
[in]num_active_dimsThe # of active features and end index of the submatrix.
[in]pReal value for p-norm.
[out]indicesMatrix of indices - (num_terms by num_active_dims)

References dakota::util::num_nonzeros(), dakota::util::p_norm(), dakota::silence_unused_args(), and size_level_index_vector().

Referenced by compute_hyperbolic_level_indices().

◆ compute_hyperbolic_level_indices()

void compute_hyperbolic_level_indices ( int  num_dims,
int  level,
double  p,
MatrixXi indices 
)

Compute the hyperbolic cross indices for a given level.

Parameters
[in]num_dimsDimension of the feature space.
[in]levelTotal order in each column of indices. Should be >= 0.
[in]pReal value for p-norm.
[out]indicesMatrix of indices - (num_dims by num_terms)

References dakota::util::append_columns(), compute_hyperbolic_subdim_level_indices(), dakota::util::nonzero(), dakota::util::num_nonzeros(), and size_level_index_vector().

Referenced by compute_hyperbolic_indices().

◆ compute_hyperbolic_indices()

void compute_hyperbolic_indices ( int  num_dims,
int  level,
double  p,
MatrixXi indices 
)

Compute the hyperbolic cross indices for all levels up to level.

Parameters
[in]num_dimsDimension of the feature space.
[in]levelHighest level to compute basis indices for.
[in]pReal value for p-norm.
[out]indicesMatrix of indices - (num_dims by num_terms).

References dakota::util::append_columns(), and compute_hyperbolic_level_indices().

Referenced by PolynomialRegression::build().

◆ compute_reduced_indices()

void compute_reduced_indices ( int  num_dims,
int  level,
MatrixXi indices 
)

Compute the reduced indices for all levels up to level.

Parameters
[in]num_dimsDimension of the feature space.
[in]levelHighest level to compute basis indices for.
[out]indicesMatrix of indices - (num_dims by num_terms).

References dakota::util::append_columns().

Referenced by PolynomialRegression::build().

◆ fd_check_gradient()

void fd_check_gradient ( Surrogate surr,
const MatrixXd sample,
MatrixXd fd_error,
const int  num_steps = 10 
)

Perform a centered finite difference check of a Surrogate's gradient method.

Parameters
[in]surrReference to a Surrogate.
[in]samplePoint to evaluate the gradient at - (1 by numVariables).
[out]fd_errorMatrix of finite difference error for each component of the gradient - (num_steps by numVariables).
[in]num_stepsNumber of increments (N) for the finite difference. The increment vector h = 10**(-i), i = 1, ..., N.

References Surrogate::dataScaler, DataScaler::get_scaler_features_scale_factors(), Surrogate::gradient(), and Surrogate::value().

◆ fd_check_hessian()

void fd_check_hessian ( Surrogate surr,
const MatrixXd sample,
MatrixXd fd_error,
const int  num_steps = 10 
)

Perform a centered finite difference check of a Surrogate's Hessian method.

Parameters
[in]surrReference to a Surrogate.
[in]samplePoint to evaluate the Hessian at - (1 by numVariables).
[out]fd_errorMatrix of finite difference error for each independent component of the Hessian. There are numVariables*(numVariables+1)/2 = numInd components - (num_steps by numInd). of the Hessian - (num_steps by numVariables).
[in]num_stepsNumber of increments (N) for the finite difference. The increment vector h = 10**(-i), i = 1, ..., N.

References Surrogate::dataScaler, DataScaler::get_scaler_features_scale_factors(), Surrogate::hessian(), and Surrogate::value().

◆ compute_cw_dists_squared()

std::vector< MatrixXd > compute_cw_dists_squared ( const std::vector< MatrixXd > &  cw_dists)

Compute a vector of component-wise squared distances from a vector of component-wise signed distances.

Parameters
[in]dists2Vector of signed component-wise distances.
Returns
Vector of squared distances.

Referenced by Matern32Kernel::compute_first_deriv_pred_gram(), Matern52Kernel::compute_first_deriv_pred_gram(), and Matern52Kernel::compute_second_deriv_pred_gram().

◆ kernel_factory()

std::shared_ptr< Kernel > kernel_factory ( const std::string &  kernel_type)

Creates a derived Kernel class.

Parameters
[in]kernel_typeName of the kernel.
Returns
Pointer to specialized kernel class.

Referenced by GaussianProcess::build(), and GaussianProcess::serialize().