![]() |
SG++-Doxygen-Documentation
|
General response surface. More...
#include <ResponseSurfaceVector.hpp>
Public Member Functions | |
sgpp::base::DataVector | averageL2Error (std::shared_ptr< sgpp::base::VectorFunction > objectiveFunc, sgpp::base::DataVector &componentwiseErrors, size_t numMCPoints=1000) |
Calculates the average l2 error between interpolant and objective function. | |
sgpp::base::DataVector | averageNRMSE (std::shared_ptr< sgpp::base::VectorFunction > objectiveFunc, sgpp::base::DataMatrix &componentwiseErrorData, size_t numMCPoints=1000) |
Calculates the normalized root mean square error between interpolant and objective function at random points. | |
virtual sgpp::base::DataVector | eval (sgpp::base::DataVector v) |
evaluates the response surface | |
virtual sgpp::base::DataVector | evalJacobian (sgpp::base::DataVector v, sgpp::base::DataMatrix &jacobian)=0 |
evaluates the response surface and its gradients | |
size_t | getNumDim () |
Calculates the normalized root mean square error between interpolant and objective function from a precalculated set of test points and according values (this set is usually generated by ResponseSurfaceVector::precalculateErrorTestData) | |
size_t | getNumRes () |
ResponseSurfaceVector (size_t numDim, size_t numRes) | |
Constructor. | |
virtual | ~ResponseSurfaceVector () |
Destructor. | |
Protected Member Functions | |
double | domainVolume () |
calculates the volume of the tensor product domain given by lb and ub | |
void | transformPoint (sgpp::base::DataVector &v, sgpp::base::DataVector lBounds, sgpp::base::DataVector uBounds, sgpp::base::DataVector newlBounds, sgpp::base::DataVector newuBounds) |
transforms a point in hyper-rectangle [lBounds,rBounds] to the hyper-rectangle [newlBounds,newuBounds] | |
Protected Attributes | |
std::shared_ptr< sgpp::base::VectorFunctionGradient > | interpolantGradients |
std::shared_ptr< sgpp::base::VectorFunction > | interpolants |
sgpp::base::DataVector | lb |
size_t | numDim |
size_t | numRes |
sgpp::base::DataVector | ub |
General response surface.
Represents an approximation of some function with vector valued output. Usually the approximation is created via interpolation. (But could also be regression for example)
|
inlineexplicit |
Constructor.
|
inlinevirtual |
Destructor.
sgpp::base::DataVector sgpp::optimization::ResponseSurfaceVector::averageL2Error | ( | std::shared_ptr< sgpp::base::VectorFunction > | objectiveFunc, |
sgpp::base::DataVector & | componentwiseErrors, | ||
size_t | numMCPoints = 1000 |
||
) |
Calculates the average l2 error between interpolant and objective function.
objectiveFunc | the objectiveFunction |
componentwiseErrors | reference to return the l2 error in each individual of the numRes components |
numMCPoints | number of Monte Carlo Points |
References sgpp::base::DataVector::abs(), sgpp::base::DataVector::add(), sgpp::base::DataVector::componentwise_mult(), eval(), sgpp::base::RandomNumberGenerator::getInstance(), sgpp::base::RandomNumberGenerator::getUniformRN(), lb, sgpp::base::DataVector::max(), sgpp::base::DataVector::min(), numDim, numRes, sgpp::base::DataVector::resizeZero(), sgpp::base::DataVector::sub(), and ub.
sgpp::base::DataVector sgpp::optimization::ResponseSurfaceVector::averageNRMSE | ( | std::shared_ptr< sgpp::base::VectorFunction > | objectiveFunc, |
sgpp::base::DataMatrix & | componentwiseErrorData, | ||
size_t | numMCPoints = 1000 |
||
) |
Calculates the normalized root mean square error between interpolant and objective function at random points.
objectiveFunc | the objectiveFunction |
componentwiseErrorData | reference to return the NRMSE, l2, min and max for each individual of the numRes components |
numMCPoints | number of Monte Carlo Points |
References sgpp::base::DataVector::abs(), sgpp::base::DataVector::add(), averageNRMSE(), sgpp::base::DataVector::componentwise_mult(), eval(), sgpp::base::RandomNumberGenerator::getInstance(), sgpp::base::RandomNumberGenerator::getUniformRN(), lb, sgpp::base::DataVector::max(), sgpp::base::DataVector::min(), numDim, numRes, sgpp::base::DataMatrix::resize(), sgpp::base::DataMatrix::setRow(), sgpp::base::DataVector::sub(), and ub.
Referenced by averageNRMSE().
|
protected |
calculates the volume of the tensor product domain given by lb and ub
References lb, numDim, and ub.
Referenced by sgpp::optimization::SplineResponseSurfaceVector::getIntegrals().
|
virtual |
evaluates the response surface
v | point in which the response surface shall be evaulated |
Reimplemented in sgpp::optimization::SplineResponseSurfaceVector.
References interpolants, and numRes.
Referenced by averageL2Error(), averageNRMSE(), and python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity().
|
pure virtual |
evaluates the response surface and its gradients
v | point in which the response surface shall be evaluated |
jacobian | reference to return the jacobian evaluated in v. Each row is one gradient |
Implemented in sgpp::optimization::SplineResponseSurfaceVector.
|
inline |
Calculates the normalized root mean square error between interpolant and objective function from a precalculated set of test points and according values (this set is usually generated by ResponseSurfaceVector::precalculateErrorTestData)
fileName | path to the stored data set |
numMCPoints | the first numMCPoints of the data set are used |
numDim | number of dimensions |
objectiveFunc | the objective function |
numMCPoints | number of Monte carlo Points |
path | path specifying where to save the generated data |
References numDim.
|
inline |
References numRes.
|
protected |
transforms a point in hyper-rectangle [lBounds,rBounds] to the hyper-rectangle [newlBounds,newuBounds]
v | point in [lBounds,uBounds] |
lBounds | lower bounds |
uBounds | upper bounds |
newlBounds | new lower bounds |
newuBounds | new upper bounds |
References sgpp::base::DataVector::add(), sgpp::base::DataVector::componentwise_div(), sgpp::base::DataVector::componentwise_mult(), and sgpp::base::DataVector::sub().
Referenced by sgpp::optimization::SplineResponseSurfaceVector::eval(), and sgpp::optimization::SplineResponseSurfaceVector::evalJacobian().
|
protected |
Referenced by sgpp::optimization::SplineResponseSurfaceVector::distributionAdaptive(), sgpp::optimization::SplineResponseSurfaceVector::evalJacobian(), sgpp::optimization::SplineResponseSurfaceVector::full(), sgpp::optimization::SplineResponseSurfaceVector::regular(), sgpp::optimization::SplineResponseSurfaceVector::regularByPoints(), sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector(), and sgpp::optimization::SplineResponseSurfaceVector::surplusAdaptive().
|
protected |
Referenced by sgpp::optimization::SplineResponseSurfaceVector::distributionAdaptive(), eval(), sgpp::optimization::SplineResponseSurfaceVector::eval(), sgpp::optimization::SplineResponseSurfaceVector::full(), sgpp::optimization::SplineResponseSurfaceVector::regular(), sgpp::optimization::SplineResponseSurfaceVector::regularByPoints(), sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector(), and sgpp::optimization::SplineResponseSurfaceVector::surplusAdaptive().
|
protected |
Referenced by averageL2Error(), averageNRMSE(), domainVolume(), sgpp::optimization::SplineResponseSurfaceVector::eval(), sgpp::optimization::SplineResponseSurfaceVector::evalJacobian(), sgpp::optimization::SplineResponseSurfaceVector::getLowerBounds(), sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector(), and sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector().
|
protected |
|
protected |
Referenced by averageL2Error(), averageNRMSE(), eval(), sgpp::optimization::SplineResponseSurfaceVector::getIntegrals(), sgpp::optimization::SplineResponseSurfaceVector::getMeans(), getNumRes(), sgpp::optimization::SplineResponseSurfaceVector::getVariances(), sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector(), and sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector().
|
protected |
Referenced by averageL2Error(), averageNRMSE(), domainVolume(), sgpp::optimization::SplineResponseSurfaceVector::eval(), sgpp::optimization::SplineResponseSurfaceVector::evalJacobian(), sgpp::optimization::SplineResponseSurfaceVector::getUpperBounds(), sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector(), and sgpp::optimization::SplineResponseSurfaceVector::SplineResponseSurfaceVector().