SG++-Doxygen-Documentation
sgpp::datadriven::OperationTest Class Referenceabstract

Operation the tests the function that is applied the current Sparse sgpp::base::Grid at a given point. More...

#include <OperationTest.hpp>

Inheritance diagram for sgpp::datadriven::OperationTest:
sgpp::datadriven::OperationTestLinear sgpp::datadriven::OperationTestLinearBoundary sgpp::datadriven::OperationTestLinearStretched sgpp::datadriven::OperationTestLinearStretchedBoundary sgpp::datadriven::OperationTestModBspline sgpp::datadriven::OperationTestModLinear sgpp::datadriven::OperationTestModPoly sgpp::datadriven::OperationTestModWavelet sgpp::datadriven::OperationTestPoly sgpp::datadriven::OperationTestPrewavelet

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)=0
 Computes the classification accuracy on some test data. More...
 
 OperationTest ()
 Constructor. More...
 
virtual double test (sgpp::base::DataVector &alpha, sgpp::base::DataMatrix &data, sgpp::base::DataVector &classes)=0
 Computes the classification accuracy on some test data. More...
 
virtual double testMSE (sgpp::base::DataVector &alpha, sgpp::base::DataMatrix &data, sgpp::base::DataVector &refValues)=0
 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)=0
 Computes the classification accuracy on some test data. More...
 
virtual ~OperationTest ()
 Destructor. More...
 

Detailed Description

Operation the tests the function that is applied the current Sparse sgpp::base::Grid at a given point.

Constructor & Destructor Documentation

◆ OperationTest()

sgpp::datadriven::OperationTest::OperationTest ( )
inline

Constructor.

◆ ~OperationTest()

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

Member Function Documentation

◆ calculateROCcurve()

virtual void sgpp::datadriven::OperationTest::calculateROCcurve ( sgpp::base::DataVector alpha,
sgpp::base::DataMatrix data,
sgpp::base::DataVector classes,
sgpp::base::DataVector thresholds,
sgpp::base::DataMatrix ROC_curve 
)
pure 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

Implemented in sgpp::datadriven::OperationTestModPoly, sgpp::datadriven::OperationTestPoly, sgpp::datadriven::OperationTestModBspline, sgpp::datadriven::OperationTestLinearStretchedBoundary, sgpp::datadriven::OperationTestLinearBoundary, sgpp::datadriven::OperationTestModLinear, sgpp::datadriven::OperationTestLinear, sgpp::datadriven::OperationTestLinearStretched, sgpp::datadriven::OperationTestModWavelet, and sgpp::datadriven::OperationTestPrewavelet.

Referenced by ~OperationTest().

◆ test()

virtual double sgpp::datadriven::OperationTest::test ( sgpp::base::DataVector alpha,
sgpp::base::DataMatrix data,
sgpp::base::DataVector classes 
)
pure 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

Implemented in sgpp::datadriven::OperationTestModPoly, sgpp::datadriven::OperationTestPoly, sgpp::datadriven::OperationTestModBspline, sgpp::datadriven::OperationTestLinearStretchedBoundary, sgpp::datadriven::OperationTestLinearBoundary, sgpp::datadriven::OperationTestModLinear, sgpp::datadriven::OperationTestLinear, sgpp::datadriven::OperationTestLinearStretched, sgpp::datadriven::OperationTestModWavelet, and sgpp::datadriven::OperationTestPrewavelet.

Referenced by ~OperationTest().

◆ testMSE()

virtual double sgpp::datadriven::OperationTest::testMSE ( sgpp::base::DataVector alpha,
sgpp::base::DataMatrix data,
sgpp::base::DataVector refValues 
)
pure 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

Implemented in sgpp::datadriven::OperationTestModPoly, sgpp::datadriven::OperationTestPoly, sgpp::datadriven::OperationTestModBspline, sgpp::datadriven::OperationTestLinearStretchedBoundary, sgpp::datadriven::OperationTestLinearBoundary, sgpp::datadriven::OperationTestModLinear, sgpp::datadriven::OperationTestLinear, sgpp::datadriven::OperationTestLinearStretched, sgpp::datadriven::OperationTestModWavelet, and sgpp::datadriven::OperationTestPrewavelet.

Referenced by ~OperationTest().

◆ testWithCharacteristicNumber()

virtual double sgpp::datadriven::OperationTest::testWithCharacteristicNumber ( sgpp::base::DataVector alpha,
sgpp::base::DataMatrix data,
sgpp::base::DataVector classes,
sgpp::base::DataVector charaNumbers 
)
pure 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)

Implemented in sgpp::datadriven::OperationTestModPoly, sgpp::datadriven::OperationTestPoly, sgpp::datadriven::OperationTestModBspline, sgpp::datadriven::OperationTestLinearStretchedBoundary, sgpp::datadriven::OperationTestLinearBoundary, sgpp::datadriven::OperationTestModLinear, sgpp::datadriven::OperationTestLinear, sgpp::datadriven::OperationTestLinearStretched, sgpp::datadriven::OperationTestModWavelet, and sgpp::datadriven::OperationTestPrewavelet.

Referenced by ~OperationTest().


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