Derived approximation class for Surfpack approximation classes. Interface between Surfpack and Dakota. More...
Public Member Functions | |
SurfpackApproximation () | |
default constructor | |
SurfpackApproximation (const String &approx_type, const UShortArray &approx_order, size_t num_vars, short data_order) | |
alternate constructor | |
SurfpackApproximation (const ProblemDescDB &problem_db, const size_t &num_acv) | |
standard constructor: Surfpack surface of appropriate type will be created | |
~SurfpackApproximation () | |
destructor | |
Protected Member Functions | |
int | min_coefficients () const |
return the minimum number of samples (unknowns) required to build the derived class approximation type in numVars dimensions | |
int | recommended_coefficients () const |
return the recommended number of samples (unknowns) required to build the derived class approximation type in numVars dimensions | |
void | build () |
SurfData object will be created from Dakota's SurrogateData, and the appropriate Surfpack build method will be invoked. | |
Real | get_value (const RealVector &x) |
Return the value of the Surfpack surface for a given parameter vector x. | |
Real | get_prediction_variance (const RealVector &x) |
retrieve the variance of the predicted value for a given parameter set x (KrigingModel only) | |
const RealVector & | get_gradient (const RealVector &x) |
retrieve the approximate function gradient for a given parameter vector x | |
const RealSymMatrix & | get_hessian (const RealVector &x) |
retrieve the approximate function Hessian for a given parameter vector x | |
Real | get_diagnostic (const String &metric_type) |
retrieve the diagnostic metric for the diagnostic type specified | |
const bool | diagnostics_available () |
check if the diagnostics are available (true for the Surfpack types) | |
Private Member Functions | |
SurfData * | surrogates_to_surf_data () |
copy from SurrogateData to SurfPoint/SurfData | |
void | add_anchor_to_surfdata (SurfData &surf_data) |
set the anchor point (including gradient and hessian if present) into surf_data | |
void | add_sdp_to_surfdata (const Pecos::SurrogateDataVars &sdv, const Pecos::SurrogateDataResp &sdr, SurfData &surf_data) |
add Pecos::SurrogateData::SurrogateData{Vars,Resp} to SurfData, accounting for buildDataOrder available | |
void | copy_matrix (const RealSymMatrix &rsdm, SurfpackMatrix< Real > &surfpack_matrix) |
copy RealSymMatrix to SurfpackMatrix (Real type only) | |
Private Attributes | |
unsigned short | approxOrder |
order of polynomial approximation | |
SurfpackModel * | model |
The native Surfpack approximation. | |
SurfpackModelFactory * | factory |
factory for the SurfpackModel instance | |
SurfData * | surfData |
The data used to build the approximation, in Surfpack format. |
Derived approximation class for Surfpack approximation classes. Interface between Surfpack and Dakota.
The SurfpackApproximation class is the interface between Dakota and Surfpack. Based on the information in the ProblemDescDB that is passed in through the constructor, SurfpackApproximation builds a Surfpack Surface object that corresponds to one of the following data-fitting techniques: polynomial regression, kriging, artificial neural networks, radial basis function network, or multivariate adaptaive regression splines (MARS).
SurfpackApproximation | ( | const String & | approx_type, |
const UShortArray & | approx_order, | ||
size_t | num_vars, | ||
short | data_order | ||
) |
alternate constructor
On-the-fly constructor which uses mostly Surfpack model defaults.
References Dakota::abort_handler(), Approximation::approxLowerBounds, SurfpackApproximation::approxOrder, Approximation::approxType, Approximation::approxUpperBounds, Approximation::buildDataOrder, Dakota::copy_data(), and SurfpackApproximation::factory.
void build | ( | ) | [protected, virtual] |
SurfData object will be created from Dakota's SurrogateData, and the appropriate Surfpack build method will be invoked.
surfData will be deleted in dtor
Reimplemented from Approximation.
References Dakota::abort_handler(), Approximation::approxLowerBounds, Approximation::approxUpperBounds, Dakota::copy_data(), SurfpackApproximation::factory, SurfpackApproximation::model, Approximation::outputLevel, SurfpackApproximation::surfData, and SurfpackApproximation::surrogates_to_surf_data().
const RealSymMatrix & get_hessian | ( | const RealVector & | x | ) | [protected, virtual] |
retrieve the approximate function Hessian for a given parameter vector x
Reimplemented from Approximation.
References Dakota::abort_handler(), Approximation::approxHessian, Approximation::approxType, Dakota::copy_data(), and SurfpackApproximation::model.
SurfData * surrogates_to_surf_data | ( | ) | [private] |
copy from SurrogateData to SurfPoint/SurfData
Copy the data stored in Dakota-style SurrogateData into Surfpack-style SurfPoint and SurfData objects.
References SurfpackApproximation::add_anchor_to_surfdata(), SurfpackApproximation::add_sdp_to_surfdata(), Approximation::approxData, Approximation::buildDataOrder, SurfpackApproximation::factory, and Approximation::outputLevel.
Referenced by SurfpackApproximation::build().
void add_anchor_to_surfdata | ( | SurfData & | surf_data | ) | [private] |
set the anchor point (including gradient and hessian if present) into surf_data
If there is an anchor point, add an equality constraint for its response value. Also add constraints for gradient and hessian, if applicable.
References Dakota::abort_handler(), Approximation::approxData, Dakota::copy_data(), Approximation::outputLevel, and Dakota::write_data().
Referenced by SurfpackApproximation::surrogates_to_surf_data().