Dakota
Version 6.21
Explore and Predict with Confidence
|
Derived approximation class for Surfpack approximation classes. Interface between Surfpack and Dakota. More...
Public Member Functions | |
SharedSurfpackApproxData () | |
default constructor | |
SharedSurfpackApproxData (const String &approx_type, const UShortArray &approx_order, size_t num_vars, short data_order, short output_level) | |
alternate constructor More... | |
SharedSurfpackApproxData (ProblemDescDB &problem_db, size_t num_vars) | |
standard constructor: Surfpack surface of appropriate type will be created More... | |
~SharedSurfpackApproxData () | |
destructor | |
Public Member Functions inherited from SharedApproxData | |
SharedApproxData () | |
default constructor More... | |
SharedApproxData (ProblemDescDB &problem_db, size_t num_vars) | |
standard constructor for envelope More... | |
SharedApproxData (const String &approx_type, const UShortArray &approx_order, size_t num_vars, short data_order, short output_level) | |
alternate constructor for envelope More... | |
SharedApproxData (const SharedApproxData &approx) | |
copy constructor More... | |
virtual | ~SharedApproxData () |
destructor | |
SharedApproxData | operator= (const SharedApproxData &approx) |
assignment operator | |
virtual void | active_model_key (const Pecos::ActiveKey &key) |
activate an approximation state based on its multi-index key | |
virtual void | clear_model_keys () |
reset initial state by clearing all model keys for an approximation | |
virtual void | integration_iterator (const Iterator &iterator) |
set integration driver for structured grid approximations | |
virtual short | discrepancy_reduction () const |
return the discrepancy type for approximations that support MLMF | |
virtual void | build () |
builds the shared approximation data from scratch | |
virtual void | rebuild () |
rebuilds the shared approximation data incrementally | |
virtual void | pop (bool save_surr_data) |
back out the previous increment to the shared approximation data | |
virtual bool | push_available () |
queries availability of pushing data associated with a trial set | |
virtual size_t | push_index (const Pecos::ActiveKey &key) |
return index for restoring trial set within stored data sets | |
virtual void | pre_push () |
push a previous state of the shared approximation data | |
virtual void | post_push () |
clean up popped bookkeeping following push | |
virtual size_t | finalize_index (size_t i, const Pecos::ActiveKey &key) |
return index of i-th trial set within restorable bookkeeping sets | |
virtual void | pre_finalize () |
finalize the shared approximation data following a set of increments | |
virtual void | post_finalize () |
clean up popped bookkeeping following aggregation | |
virtual void | clear_inactive () |
clear inactive approximation data | |
virtual void | pre_combine () |
aggregate the shared approximation data from current and stored states | |
virtual void | post_combine () |
clean up stored data sets after aggregation | |
virtual void | combined_to_active (bool clear_combined=true) |
promote aggregated data sets to active state | |
virtual bool | advancement_available () |
queries availability of advancing the approximation resolution | |
virtual void | increment_order () |
increments polynomial expansion order (PCE, FT) | |
virtual void | decrement_order () |
decrements polynomial expansion order (PCE, FT) | |
virtual void | construct_basis (const Pecos::MultivariateDistribution &mv_dist) |
construct the shared basis for an expansion-based approximation | |
virtual void | update_basis_distribution_parameters (const Pecos::MultivariateDistribution &mvd) |
propagate updates to random variable distribution parameters to a polynomial basis | |
virtual void | configuration_options (const Pecos::ExpansionConfigOptions &ec_options) |
set ExpansionConfigOptions instance as a group specification | |
virtual void | configuration_options (const Pecos::BasisConfigOptions &bc_options) |
set BasisConfigOptions instance as a group specification | |
virtual void | configuration_options (const Pecos::RegressionConfigOptions &rc_options) |
set BasisConfigOptions instance as a group specification | |
virtual void | random_variables_key (const BitArray &random_vars_key) |
assign key identifying a subset of variables that are to be treated as random for statistical purposes (e.g. expectation) | |
virtual void | refinement_statistics_mode (short stats_mode) |
assign mode for statistics roll-up: {ACTIVE,COMBINED}_EXPANSION_STATS | |
virtual const Pecos::BitArrayULongMap & | sobol_index_map () const |
return set of Sobol indices that have been requested (e.g., as constrained by throttling) and are computable by a (sparse) expansion of limited order | |
const Pecos::ActiveKey & | active_model_key () const |
return active multi-index key | |
void | discrepancy_emulation_mode (short mode) |
set discrepancy emulation mode for approximating response differences | |
short | discrepancy_emulation_mode () const |
return discrepancy emulation mode for approximating response differences | |
bool | formulation_updated () const |
query whether the form of an approximation has been updated | |
void | formulation_updated (bool update) |
assign the status of approximation formulation updates | |
void | set_bounds (const RealVector &c_l_bnds, const RealVector &c_u_bnds, const IntVector &di_l_bnds, const IntVector &di_u_bnds, const RealVector &dr_l_bnds, const RealVector &dr_u_bnds) |
set approximation lower and upper bounds (currently only used by graphics) | |
std::shared_ptr< SharedApproxData > | data_rep () const |
returns dataRep for access to derived class member functions that are not mapped to the top SharedApproxData level | |
Private Member Functions | |
void | add_sd_to_surfdata (const Pecos::SurrogateDataVars &sdv, const Pecos::SurrogateDataResp &sdr, short fail_code, SurfData &surf_data) |
add Pecos::SurrogateData::SurrogateData{Vars,Resp} to SurfData, accounting for buildDataOrder available | |
void | copy_matrix (const RealSymMatrix &rsm, SurfpackMatrix< Real > &surfpack_matrix) |
copy RealSymMatrix to SurfpackMatrix (Real type only) | |
template<typename RealArrayType > | |
void | merge_variable_arrays (const RealVector &cv, const IntVector &div, const RealVector &drv, RealArrayType &ra) |
merge cv, div, and drv vectors into a single ra array | |
template<typename RealArrayType > | |
void | sdv_to_realarray (const Pecos::SurrogateDataVars &sdv, RealArrayType &ra) |
aggregate {continuous,discrete int,discrete real} variables from SurrogateDataVars into ra | |
template<typename RealArrayType > | |
void | vars_to_realarray (const Variables &vars, RealArrayType &ra) |
aggregate {active,all} {continuous,discrete int,discrete real} variables into pre-sized array | |
template<typename RealArrayType > | |
void | active_vars_to_realarray (const Variables &vars, RealArrayType &ra) |
aggregate active {continuous,discrete int,discrete real} variables into pre-sized array | |
template<typename RealArrayType > | |
void | all_vars_to_realarray (const Variables &vars, RealArrayType &ra) |
aggregate all {continuous,discrete int,discrete real} variables into pre-sized array | |
StringArray | variable_labels (const Variables &vars) const |
retrieve the active or all labels over which the surrogate was built | |
void | validate_metrics (const std::set< std::string > &allowed_metrics) |
validate metric names and cross validation options | |
unsigned | compute_folds () |
compute number of folds from numFols/percentFold | |
void | map_variable_labels (const Variables &dfsm_vars, const StringArray &approx_labels) |
validate imported labels and initialize map if needed | |
template<typename RealArrayType > | |
RealArrayType | imported_eval_vars (const Variables &vars) |
when importing, take all view of vars and permute as needed | |
Private Attributes | |
std::vector< size_t > | varsMapIndices |
If populated, reorder variables when evaluating surrogate these are indices into the Model's vars so approx_eval[i] = [model_vars[ind[i]]]. | |
unsigned short | approxOrder |
order of polynomial approximation | |
StringArray | diagnosticSet |
set of diagnostic metrics | |
bool | crossValidateFlag |
whether to perform cross validation | |
unsigned | numFolds |
number of folds for CV | |
Real | percentFold |
percentage of data for CV | |
bool | pressFlag |
whether to perform PRESS | |
Friends | |
class | SurfpackApproximation |
class | VPSApproximation |
class | SurrogatesBaseApprox |
class | SurrogatesGPApprox |
class | SurrogatesPolyApprox |
class | SurrogatesPythonApprox |
Additional Inherited Members | |
Protected Member Functions inherited from SharedApproxData | |
SharedApproxData (BaseConstructor, ProblemDescDB &problem_db, size_t num_vars) | |
constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More... | |
SharedApproxData (NoDBBaseConstructor, const String &approx_type, size_t num_vars, short data_order, short output_level) | |
constructor initializes the base class part of letter classes (BaseConstructor overloading avoids infinite recursion in the derived class constructors - Coplien, p. 139) More... | |
Protected Attributes inherited from SharedApproxData | |
size_t | numVars |
number of variables in the approximation | |
String | approxType |
approximation type identifier | |
short | buildDataOrder |
order of the data used for surrogate construction, in ActiveSet request vector 3-bit format. More... | |
short | outputLevel |
output verbosity level: {SILENT,QUIET,NORMAL,VERBOSE,DEBUG}_OUTPUT | |
Pecos::ActiveKey | activeKey |
key indicating the active model or model-pair used for approximation data | |
short | discrepEmulationMode |
approach for emulating response differences: {DEFAULT,DISTINCT,RECURSIVE}_EMULATION | |
String | modelExportPrefix |
Prefix for model export files. | |
unsigned short | modelExportFormat |
Bitmapped format request for exported models. | |
RealVector | approxCLowerBnds |
approximation continuous lower bounds (used by 3D graphics and Surfpack KrigingModel) | |
RealVector | approxCUpperBnds |
approximation continuous upper bounds (used by 3D graphics and Surfpack KrigingModel) | |
IntVector | approxDILowerBnds |
approximation continuous lower bounds | |
IntVector | approxDIUpperBnds |
approximation continuous upper bounds | |
RealVector | approxDRLowerBnds |
approximation continuous lower bounds | |
RealVector | approxDRUpperBnds |
approximation continuous upper bounds | |
std::map< Pecos::ActiveKey, bool > | formUpdated |
tracker for changes in order,rank configuration since last build (used by DataFitSurrModel::rebuild_approximation()) | |
Derived approximation class for Surfpack approximation classes. Interface between Surfpack and Dakota.
The SharedSurfpackApproxData class is the interface between Dakota and Surfpack. Based on the information in the ProblemDescDB that is passed in through the constructor, SharedSurfpackApproxData 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).
SharedSurfpackApproxData | ( | const String & | approx_type, |
const UShortArray & | approx_order, | ||
size_t | num_vars, | ||
short | data_order, | ||
short | output_level | ||
) |
alternate constructor
On-the-fly constructor which uses mostly Surfpack model defaults.
References Dakota::abort_handler(), SharedSurfpackApproxData::approxOrder, and SharedApproxData::approxType.
SharedSurfpackApproxData | ( | ProblemDescDB & | problem_db, |
size_t | num_vars | ||
) |
standard constructor: Surfpack surface of appropriate type will be created
Initialize the embedded Surfpack surface object and configure it using the specifications from the input file. Data for the surface is created later.
References SharedSurfpackApproxData::approxOrder, SharedApproxData::approxType, ProblemDescDB::get_short(), and ProblemDescDB::get_string().