SG++-Doxygen-Documentation
sgpp::datadriven::OperationTestModBspline Class Reference

This class implements OperationTest for a grids with modified bspline basis functions with a certain degree. More...

#include <OperationTestModBspline.hpp>

Inheritance diagram for sgpp::datadriven::OperationTestModBspline:
sgpp::datadriven::OperationTest

Public Member Functions

virtual void calculateROCcurve (sgpp::base::DataVector &alpha, sgpp::base::DataMatrix &data, sgpp::base::DataVector &classes, sgpp::base::DataVector &thresholds, sgpp::base::DataMatrix &ROC_curve)
 Computes the classification accuracy on some test data. More...
 
 OperationTestModBspline (base::GridStorage *storage, size_t degree)
 Constructor. More...
 
virtual double test (base::DataVector &alpha, base::DataMatrix &data, base::DataVector &classes)
 Computes the classification accuracy on some test data. More...
 
virtual double testMSE (base::DataVector &alpha, base::DataMatrix &data, base::DataVector &refValues)
 Computes the regression accuracy on some test data. More...
 
virtual double testWithCharacteristicNumber (sgpp::base::DataVector &alpha, sgpp::base::DataMatrix &data, sgpp::base::DataVector &classes, sgpp::base::DataVector &charaNumbers)
 Computes the classification accuracy on some test data. More...
 
virtual ~OperationTestModBspline ()
 Destructor. More...
 
- Public Member Functions inherited from sgpp::datadriven::OperationTest
 OperationTest ()
 Constructor. More...
 
virtual ~OperationTest ()
 Destructor. More...
 

Protected Attributes

base::SBsplineModifiedBase base
 Mod Bspline Basis object. More...
 
base::GridStoragestorage
 Pointer to base::GridStorage object. More...
 

Detailed Description

This class implements OperationTest for a grids with modified bspline basis functions with a certain degree.

Constructor & Destructor Documentation

◆ OperationTestModBspline()

sgpp::datadriven::OperationTestModBspline::OperationTestModBspline ( base::GridStorage storage,
size_t  degree 
)
inlineexplicit

Constructor.

Parameters
storagethe grid's base::GridStorage object
degreethe bspline's degree

◆ ~OperationTestModBspline()

virtual sgpp::datadriven::OperationTestModBspline::~OperationTestModBspline ( )
inlinevirtual

Member Function Documentation

◆ calculateROCcurve()

void sgpp::datadriven::OperationTestModBspline::calculateROCcurve ( sgpp::base::DataVector alpha,
sgpp::base::DataMatrix data,
sgpp::base::DataVector classes,
sgpp::base::DataVector thresholds,
sgpp::base::DataMatrix ROC_curve 
)
virtual

Computes the classification accuracy on some test data.

The function is evaluated at the given points. Tests on the classes {+1, -1}, cut-off variable at threshold

Also the number of the TP TN FP FN are determined

Parameters
alphathe coefficients of the sparse grid's base functions
datathe coordinates of the evaluation points
classessgpp::base::DataVector the holds the class information
thresholdsthe thresholds (between -1.0 and 1.0) for calculating the ROC curve
ROC_curveDataMatrix into which the ROC curve is stored

Implements sgpp::datadriven::OperationTest.

References base, storage, and sgpp::datadriven::test_calculateROCcurve().

Referenced by ~OperationTestModBspline().

◆ test()

double sgpp::datadriven::OperationTestModBspline::test ( base::DataVector alpha,
base::DataMatrix data,
base::DataVector classes 
)
virtual

Computes the classification accuracy on some test data.

The function is evaluated at the given points. Tests on the classes {+1, -1}, cut-off at 0.

Parameters
alphathe coefficients of the sparse grid's base functions
datathe coordinates of the evaluation points
classessgpp::base::DataVector holding the class information

Implements sgpp::datadriven::OperationTest.

References base, storage, and sgpp::datadriven::test_dataset().

Referenced by ~OperationTestModBspline().

◆ testMSE()

double sgpp::datadriven::OperationTestModBspline::testMSE ( base::DataVector alpha,
base::DataMatrix data,
base::DataVector refValues 
)
virtual

Computes the regression accuracy on some test data.

The function is evaluated at the given points. Calculates the MSE between between the given values and the values evaluated on the sparse grid.

Parameters
alphathe coefficients of the sparse grid's base functions
datathe coordinates of the evaluation points
refValuessgpp::base::DataVector holding the reference function values

Implements sgpp::datadriven::OperationTest.

References base, storage, and sgpp::datadriven::test_dataset_mse().

Referenced by ~OperationTestModBspline().

◆ testWithCharacteristicNumber()

double sgpp::datadriven::OperationTestModBspline::testWithCharacteristicNumber ( sgpp::base::DataVector alpha,
sgpp::base::DataMatrix data,
sgpp::base::DataVector classes,
sgpp::base::DataVector charaNumbers 
)
virtual

Computes the classification accuracy on some test data.

The function is evaluated at the given points. Tests on the classes {+1, -1}, cut-off at 0.

Also the number of the TP TN FP FN are determined

Parameters
alphathe coefficients of the sparse grid's base functions
datathe coordinates of the evaluation points
classessgpp::base::DataVector the holds the class information
charaNumbersthe number of true positives, true negatives, false positives, false negatives (Vector of length 4)

Implements sgpp::datadriven::OperationTest.

References base, storage, and sgpp::datadriven::test_datasetWithCharacteristicNumber().

Referenced by ~OperationTestModBspline().

Member Data Documentation

◆ base

base::SBsplineModifiedBase sgpp::datadriven::OperationTestModBspline::base
protected

Mod Bspline Basis object.

Referenced by calculateROCcurve(), test(), testMSE(), and testWithCharacteristicNumber().

◆ storage

base::GridStorage* sgpp::datadriven::OperationTestModBspline::storage
protected

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