$extrastylesheet
Dakota
Version 6.2
|
Class for testing various Adaptively sampling methods using geometric, statisctical, and topological information of the surrogate. More...
Public Member Functions | |
NonDAdaptiveSampling (ProblemDescDB &problem_db, Model &model) | |
standard constructor | |
~NonDAdaptiveSampling () | |
alternate constructor for sample generation and evaluation "on the fly" has not been implemented | |
Protected Member Functions | |
void | derived_init_communicators (ParLevLIter pl_iter) |
derived class contributions to initializing the communicators associated with this Iterator instance | |
void | derived_set_communicators (ParLevLIter pl_iter) |
derived class contributions to setting the communicators associated with this Iterator instance | |
void | derived_free_communicators (ParLevLIter pl_iter) |
derived class contributions to freeing the communicators associated with this Iterator instance | |
void | quantify_uncertainty () |
perform the GP importance sampling and return probability of failure. | |
Real | final_probability () |
returns the probability calculated by the importance sampling | |
void | print_results (std::ostream &s) |
print the final statistics | |
Private Member Functions | |
void | calc_score_alm () |
Function to compute the ALM scores for the candidate points ALM score is the variance computed by the surrogate at the point. | |
void | calc_score_delta_x () |
Function to compute the Distance scores for the candidate points Distance score is the shortest distance between the candidate and an existing training point. | |
void | calc_score_delta_y () |
Function to compute the Gradient scores for the candidate points Gradient score is the function value difference between a candidate's surrogate response and its nearest evaluated true response from the training set. | |
void | calc_score_topo_bottleneck () |
Function to compute the Bottleneck scores for the candidate points Bottleneck score is computed by determining the bottleneck distance between the persistence diagrams of two approximate Morse-Smale complices. The complices used include one built from only the training data, and another built from the training data and the single candidate. | |
void | calc_score_topo_avg_persistence (int respFnCount) |
Function to compute the Average Change in Persistence scores for the candidate points Avg_Persistence score is computed as the average change in persistence each point undergoes between two approximate Morse-Smale complices. The complices used include one built from only the training data, and another built from the training data and the single candidate. | |
void | calc_score_topo_highest_persistence (int respFnCount) |
Function to compute the Highest Persistence scores for the candidate points Highest Persistence score is calculated as a ranking of a set of candidates by constructing an approximate Morse-Smale complex over the entire set of candidates, using their surrogate responses, and the training data, using their true responses, and ranking points based on the most topological significance as measured by their persistence values. In the case where there are no topologically significant points, the point will be chosen randomly TODO: It may be wiser to fall back to a scheme that ranks points based on proximity to extrema, or the most significant extream? | |
void | calc_score_topo_alm_hybrid (int respFnCount) |
Function to comptue the Hybrid scores for the candidate points Hybrid score is computed the same as Avg_Persistence score except that instead of computing one score, three scores are computing not only a mean surface, but a mean +/- std. dev. surfaces and then averaging the three separate scores. The hope is that you strike a balance between selecting points in topologically important areas and areas of high uncertainty. | |
Real | calc_score_alm (int respFnCount, RealVector &test_point) |
Same as the otehr function of the same name, only this allows the user to specify the location of the candidate. | |
Real | calc_score_delta_x (int respFnCount, RealVector &test_point) |
Same as the otehr function of the same name, only this allows the user to specify the location of the candidate. | |
Real | calc_score_delta_y (int respFnCount, RealVector &test_point) |
Same as the otehr function of the same name, only this allows the user to specify the location of the candidate. | |
Real | calc_score_topo_bottleneck (int respFnCount, RealVector &test_point) |
Same as the otehr function of the same name, only this allows the user to specify the location of the candidate. | |
Real | calc_score_topo_avg_persistence (int respFnCount, RealVector &test_point) |
Same as the otehr function of the same name, only this allows the user to specify the location of the candidate. | |
Real | calc_score_topo_alm_hybrid (int respFnCount, RealVector &test_point) |
Same as the otehr function of the same name, only this allows the user to specify the location of the candidate. | |
Real | compute_rmspe () |
Using the validationSet, compute the RMSE over the surface. | |
void | compare_complices (int dim, std::ostream &output) |
Using the validationSet, compute the approximate Morse-Smale complices of the true model over the validationSet as well as the surrogate model over the validationSet, and output some topological comparisons. | |
void | parse_options () |
Parse misc_options specified in a user input deck. | |
RealVectorArray | drawNewX (int this_k, int respFnCount=0) |
function to pick the next X value to be evaluated by the Iterated model | |
void | output_round_data (int round, int respFnCount=0) |
Temporary function for dumping validation data to output files to be visualized in TopoAS. | |
void | update_amsc (int respFnCount=0) |
Update the approximate Morse-Smale complex based on the training points and selected candidates. Uses surrogate function responses. | |
void | construct_fsu_sampler (Iterator &u_space_sampler, Model &u_model, int num_samples, int seed, unsigned short sample_type) |
Copy of construct_lhs only it allows for the construction of FSU sample designs. This can break the fsu_cvt, so it is not used at the moment, and these designs only affect the initial sample build not the candidate sets constructed at each round. | |
void | output_for_optimization (int dim) |
This function will write an input deck for a multi-start global optimization run of DAKOTA by extracting all of the local minima off the approximate Morse-Smale complex created from the validation set of the surrogate model. | |
Real | median (const RealVector &sorted_data) |
compute the median of the sorted values passed in | |
void | pick_new_candidates () |
Pick new candidates from Emulator. | |
void | score_new_candidates () |
Score New candidates based on the chosen metrics. | |
Private Attributes | |
Iterator | gpBuild |
LHS iterator for building the initial GP. | |
Iterator | gpEval |
LHS iterator for sampling on the GP. | |
Iterator | gpFinalEval |
LHS iterator for sampling on the final GP. | |
Model | gpModel |
GP model of response, one approximation per response function. | |
int | numRounds |
the number of rounds of additions of size batchSize to add to the original set of LHS samples | |
int | numPtsTotal |
the total number of points | |
int | numEmulEval |
the number of points evaluated by the GP each iteration | |
int | numFinalEmulEval |
number of points evaluated on the final GP | |
int | scoringMethod |
the type of scoring metric to use for sampling | |
Real | finalProb |
the final calculated probability (p) | |
RealVectorArray | gpCvars |
Vector to hold the current values of the current sample inputs on the GP. | |
RealVectorArray | gpMeans |
Vector to hold the current values of the current mean estimates for the sample values on the GP. | |
RealVectorArray | gpVar |
Vector to hold the current values of the current variance estimates for the sample values on the GP. | |
RealVector | emulEvalScores |
Vector to hold the scored values for the current GP samples. | |
RealVector | predictionErrors |
Vector to hold the RMSE after each round of adaptively fitting the model. | |
RealVectorArray | validationSet |
Validation point set used to determine predictionErrors above. | |
RealVector | yTrue |
True function responses at the values corresponding to validationSet. | |
RealVector | yModel |
Surrogate function responses at the values corresponding to validationSet. | |
int | validationSetSize |
Number of points used in the validationSet. | |
int | batchSize |
Number of points to add each round, default = 1. | |
String | batchStrategy |
String describing the tpye of batch addition to use. Allowable values are naive, distance, topology. | |
String | outputDir |
Temporary string for dumping validation files used in TopoAS visualization. | |
String | scoringMetric |
String describing the method for scoring candidate points. Options are: alm, distance, gradient, highest_persistence, avg_persistence, bottleneck, alm_topo_hybrid Note: alm and alm_topo_hybrid will fail when used with surrogates other than global_kriging as it is based on the variance of the surrogate. At the time of implementation, global_kriging is the only surrogate capable of yielding this information. | |
unsigned short | sampleDesign |
enum describing the initial sample design. Options are: RANDOM_SAMPLING, FSU_CVT, FSU_HALTON, FSU_HAMMERSLEY | |
String | approx_type |
String describing type of surrogate is used to fit the data. Options are: global_kriging, global_mars, global_neural_network, global_polynomial, globabl_moving_least_squares, global_radial_basis. | |
MS_Complex * | AMSC |
The approximate Morse-Smale complex data structure. | |
int | numKneighbors |
The number of approximate nearest neighbors to use in computing the AMSC. | |
bool | outputValidationData |
Temporary variable for toggling writing of data files to be used by TopoAS. |
Class for testing various Adaptively sampling methods using geometric, statisctical, and topological information of the surrogate.
NonDAdaptiveSampling implements an adaptive sampling method based on the work presented in Adaptive Sampling with Topological Scores by Dan Maljovec, Bei Wang, Ana Kupresanin, Gardar Johannesson, Valerio Pascucci, and Peer-Timo Bremer presented in IJUQ (insert issue). The method computes scores based on the topology of the known data and the topology of the surrogate model. A number of alternate adaption strategies are offered as well.
NonDAdaptiveSampling | ( | ProblemDescDB & | problem_db, |
Model & | model | ||
) |
standard constructor
This constructor is called for a standard letter-envelope iterator instantiation. In this case, set_db_list_nodes has been called and probDescDB can be queried for settings from the method specification.
References Response::active_set(), NonDAdaptiveSampling::AMSC, NonDAdaptiveSampling::approx_type, Iterator::assign_rep(), Model::assign_rep(), NonDAdaptiveSampling::batchSize, NonDAdaptiveSampling::batchStrategy, NonDAdaptiveSampling::construct_fsu_sampler(), NonD::construct_lhs(), Model::current_response(), ProblemDescDB::get_bool(), ProblemDescDB::get_int(), ProblemDescDB::get_sa(), ProblemDescDB::get_string(), ProblemDescDB::get_ushort(), NonDAdaptiveSampling::gpBuild, NonDAdaptiveSampling::gpEval, NonDAdaptiveSampling::gpFinalEval, NonDAdaptiveSampling::gpModel, Model::gradient_type(), Model::hessian_type(), Iterator::iteratedModel, Iterator::maxIterations, NonDAdaptiveSampling::numEmulEval, NonDAdaptiveSampling::numFinalEmulEval, NonDAdaptiveSampling::numKneighbors, NonDAdaptiveSampling::numRounds, NonDSampling::numSamples, NonDAdaptiveSampling::outputDir, Iterator::outputLevel, NonDAdaptiveSampling::outputValidationData, NonDAdaptiveSampling::parse_options(), Iterator::probDescDB, NonDSampling::randomSeed, ActiveSet::request_values(), NonDSampling::rngName, NonDAdaptiveSampling::sampleDesign, NonDAdaptiveSampling::scoringMetric, NonDSampling::vary_pattern(), and NonDSampling::varyPattern.
~NonDAdaptiveSampling | ( | ) |
alternate constructor for sample generation and evaluation "on the fly" has not been implemented
destructor