SG++-Doxygen-Documentation
sgpp::base::PredictiveRefinementIndicator Class Reference

A refinement error indicator for regression problems based on the residuals of the datasets. More...

#include <PredictiveRefinementIndicator.hpp>

Inheritance diagram for sgpp::base::PredictiveRefinementIndicator:

## 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

DataMatrixdataSet

DataVectorerrorVector

size_t refinementsNum
number of grid points to refine More...

double threshold
threshold, only the points with greater to equal absolute values More...

## Detailed Description

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.

## Member Typedef Documentation

 typedef uint64_t sgpp::base::PredictiveRefinementIndicator::counter_value_type
 typedef std::pair sgpp::base::PredictiveRefinementIndicator::value_type

## Constructor & Destructor Documentation

 sgpp::base::PredictiveRefinementIndicator::PredictiveRefinementIndicator ( Grid & grid, DataMatrix & dataSet, DataVector & errorVector, size_t refinements_num = 1, double threshold = 0.0, uint64_t minSupportPoints = 0 )

Constructor.

Parameters
 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.

 virtual sgpp::base::PredictiveRefinementIndicator::~PredictiveRefinementIndicator ( )
inlinevirtual

Destructor.

## Member Function Documentation

 double sgpp::base::PredictiveRefinementIndicator::basisFunctionEvalHelper ( level_t level, index_t index, double value )
protected
 uint64_t sgpp::base::PredictiveRefinementIndicator::getMinSupportPoints ( ) const
inline

Returns the lower bound of refinement criterion (e.g., alpha or error.

 size_t sgpp::base::PredictiveRefinementIndicator::getRefinementsNum ( ) const
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.

Returns
number of points that should refined. Default value: 1.

Reimplemented from sgpp::base::RefinementFunctor.

References refinementsNum.

Referenced by ~PredictiveRefinementIndicator().

 double sgpp::base::PredictiveRefinementIndicator::getRefinementThreshold ( ) const
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.

Returns
threshold value for refinement. Default value: 0.

Implements sgpp::base::RefinementFunctor.

References threshold.

Referenced by ~PredictiveRefinementIndicator().

 double sgpp::base::PredictiveRefinementIndicator::operator() ( GridPoint & point ) const
virtual

This should be returning a refinement indicator for the specified grid point The point with the highest value will be refined first.

Parameters
 point for which to calculate an indicator value
Returns
refinement value

errorVector->get(row)

Referenced by setMinSupportPoints(), and ~PredictiveRefinementIndicator().

 double sgpp::base::PredictiveRefinementIndicator::operator() ( GridStorage & storage, size_t seq ) const
overridevirtual

This should be returning a refinement value for every grid point.

The point with the highest value will be refined first.

Parameters
 storage reference to the grids storage object seq sequence number in the coefficients array
Returns
refinement value

Implements sgpp::base::RefinementFunctor.

 double sgpp::base::PredictiveRefinementIndicator::runOperator ( GridStorage & storage, size_t seq )
 void sgpp::base::PredictiveRefinementIndicator::setMinSupportPoints ( uint64_t minSupportPoints )
inline

References operator()().

 double sgpp::base::PredictiveRefinementIndicator::start ( ) const
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

Returns
lower bound

Implements sgpp::base::RefinementFunctor.

## Member Data Documentation

 DataMatrix& sgpp::base::PredictiveRefinementIndicator::dataSet
protected

Referenced by operator()().

 DataVector& sgpp::base::PredictiveRefinementIndicator::errorVector
protected

Referenced by operator()().

 size_t sgpp::base::PredictiveRefinementIndicator::refinementsNum
protected

number of grid points to refine

Referenced by getRefinementsNum(), and PredictiveRefinementIndicator().

 double sgpp::base::PredictiveRefinementIndicator::threshold
protected

threshold, only the points with greater to equal absolute values

Referenced by getRefinementThreshold(), and PredictiveRefinementIndicator().

The documentation for this class was generated from the following files: