SG++-Doxygen-Documentation
|
A refinement error indicator for regression problems based on the residuals of the datasets. More...
#include <PredictiveRefinementIndicator.hpp>
Public Types | |
typedef GridPoint | counter_key_type |
typedef uint64_t | counter_value_type |
typedef std::pair< size_t, double > | value_type |
Public Types inherited from sgpp::base::RefinementFunctor | |
typedef double | value_type |
Public Member Functions | |
uint64_t | getMinSupportPoints () const |
Returns the lower bound of refinement criterion (e.g., alpha or error. More... | |
size_t | getRefinementsNum () const override |
Returns the maximal number of points that should be refined. More... | |
double | getRefinementThreshold () const override |
Returns the threshold for refinement. More... | |
virtual double | operator() (GridPoint &point) const |
This should be returning a refinement indicator for the specified grid point The point with the highest value will be refined first. More... | |
double | operator() (GridStorage &storage, size_t seq) const override |
This should be returning a refinement value for every grid point. More... | |
PredictiveRefinementIndicator (Grid &grid, DataMatrix &dataSet, DataVector &errorVector, size_t refinements_num=1, double threshold=0.0, uint64_t minSupportPoints=0) | |
Constructor. More... | |
double | runOperator (GridStorage &storage, size_t seq) |
void | setMinSupportPoints (uint64_t minSupportPoints) |
double | start () const override |
Returns the lower bound of refinement criterion (e.g., alpha or error) (lower bound). More... | |
virtual | ~PredictiveRefinementIndicator () |
Destructor. More... | |
Public Member Functions inherited from sgpp::base::RefinementFunctor | |
virtual double | getTotalRefinementValue (GridStorage &storage) const |
Returns the total sum of local (error) indicators used for refinement. More... | |
RefinementFunctor () | |
Constructor. More... | |
virtual | ~RefinementFunctor () |
Destructor. More... | |
Protected Member Functions | |
double | basisFunctionEvalHelper (level_t level, index_t index, double value) |
Protected Attributes | |
DataMatrix & | dataSet |
DataVector & | errorVector |
size_t | refinementsNum |
number of grid points to refine More... | |
double | threshold |
threshold, only the points with greater to equal absolute values More... | |
A refinement error indicator for regression problems based on the residuals of the datasets.
It calculates an error messure based on the information from the data set: For a new grid point g on level l and index i, it calculates the indicator as a sum of squared residuals ( (value of sample from dataset - grid evaluated at the sample's coordinates), squared), weighted with the underlying basis function of the grid point.
typedef uint64_t sgpp::base::PredictiveRefinementIndicator::counter_value_type |
typedef std::pair<size_t, double> sgpp::base::PredictiveRefinementIndicator::value_type |
sgpp::base::PredictiveRefinementIndicator::PredictiveRefinementIndicator | ( | Grid & | grid, |
DataMatrix & | dataSet, | ||
DataVector & | errorVector, | ||
size_t | refinements_num = 1 , |
||
double | threshold = 0.0 , |
||
uint64_t | minSupportPoints = 0 |
||
) |
Constructor.
grid | DataVector that is basis for refinement decisions. The i-th entry corresponds to the i-th grid point. |
dataSet | contains all points of the source data set. Each row contains coordinates of a single grid point, without the function evaluation (meaning only data from omega). |
errorVector | a DataVector containing the squared absolute error (given value of data point - evaluation of sparse grid at the data point position) for each grid point in dataSet. |
refinements_num | the amount of grid points to maximally be refined or created, depending on refinement strategy. |
threshold | The absolute value of the entries have to be greater or equal than the threshold |
minSupportPoints | The minimal number of data points that have to be within the support of a basis function for refinement. |
References sgpp::base::Grid::getType(), refinementsNum, and threshold.
|
inlinevirtual |
Destructor.
References getRefinementsNum(), getRefinementThreshold(), operator()(), chess::point, runOperator(), and start().
|
protected |
|
inline |
Returns the lower bound of refinement criterion (e.g., alpha or error.
|
overridevirtual |
Returns the maximal number of points that should be refined.
The maximal number of points to refine is set in the constructor of the implementing class.
Reimplemented from sgpp::base::RefinementFunctor.
References refinementsNum.
Referenced by ~PredictiveRefinementIndicator().
|
overridevirtual |
Returns the threshold for refinement.
Only the grid points with absolute value of refinement criterion (e.g., alpha or error) greater or equal to this threshold will be refined.
Implements sgpp::base::RefinementFunctor.
References threshold.
Referenced by ~PredictiveRefinementIndicator().
|
virtual |
This should be returning a refinement indicator for the specified grid point The point with the highest value will be refined first.
point | for which to calculate an indicator value |
errorVector->get(row)
References analyse_erg::counter, dataSet, chess::dim, errorVector, sgpp::base::Basis< LT, IT >::eval(), sgpp::base::DataVector::get(), sgpp::base::DataMatrix::get(), sgpp::base::Grid::getBasis(), sgpp::base::HashGridPoint::getDimension(), sgpp::base::HashGridPoint::getIndex(), sgpp::base::HashGridPoint::getLevel(), sgpp::base::DataMatrix::getNrows(), and level.
Referenced by setMinSupportPoints(), and ~PredictiveRefinementIndicator().
|
overridevirtual |
This should be returning a refinement value for every grid point.
The point with the highest value will be refined first.
storage | reference to the grids storage object |
seq | sequence number in the coefficients array |
Implements sgpp::base::RefinementFunctor.
double sgpp::base::PredictiveRefinementIndicator::runOperator | ( | GridStorage & | storage, |
size_t | seq | ||
) |
References sgpp::base::HashGridStorage::getPoint().
Referenced by ~PredictiveRefinementIndicator().
|
inline |
References operator()().
|
overridevirtual |
Returns the lower bound of refinement criterion (e.g., alpha or error) (lower bound).
The refinement value of grid points to be refined have to be larger than this value
Implements sgpp::base::RefinementFunctor.
Referenced by sgpp::base::PredictiveRefinement::getIndicator(), and ~PredictiveRefinementIndicator().
|
protected |
Referenced by operator()().
|
protected |
Referenced by operator()().
|
protected |
number of grid points to refine
Referenced by getRefinementsNum(), and PredictiveRefinementIndicator().
|
protected |
threshold, only the points with greater to equal absolute values
Referenced by getRefinementThreshold(), and PredictiveRefinementIndicator().