19 "Tool for extracting cross-validation scores and storing them in a reporter for output.");
21 params.
addRequiredParam<std::vector<UserObjectName>>(
"models",
"Names of surrogate models.");
29 for (
const auto & mn :
getParam<std::vector<UserObjectName>>(
"models"))
39 for (
unsigned int m = 0; m <
_models.size(); ++m)
40 (*
_cv_scores[m]) =
_models[m]->getModelData<std::vector<std::vector<Real>>>(
"cv_scores");
T & declareValueByName(const ReporterValueName &value_name, Args &&... args)
static InputParameters validParams()
registerMooseObject("StochasticToolsApp", CrossValidationScores)
std::vector< const SurrogateModel * > _models
Model to extract CV values from.
T & getSurrogateModelByName(const UserObjectName &name) const
Get a sampler with a given name.
static InputParameters validParams()
const T & getParam(const std::string &name) const
CrossValidationScores(const InputParameters ¶meters)
std::vector< std::vector< std::vector< Real > > * > _cv_scores
Storage for cross-validation scores.
virtual void execute() override
Interface for objects that need to use samplers.
A tool to output CV scores.