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

Metric that quantifies the difference between predicted values and actual values in terms of mean squared error (MSE). More...

#include <Accuracy.hpp>

Inheritance diagram for sgpp::datadriven::Accuracy:
sgpp::datadriven::Metric

Public Member Functions

Metricclone () const override
 Polymorphic clone pattern. More...
 
double measure (const DataVector &predictedValues, const DataVector &trueValues) const override
 Quantify the difference between predicted values and actual values in terms of mean squared error. More...
 
- Public Member Functions inherited from sgpp::datadriven::Metric
 Metric ()=default
 Default constructor. More...
 
 Metric (const Metric &rhs)=default
 Copy constructor. More...
 
 Metric (Metric &&rhs)=default
 Move constructor. More...
 
Metricoperator= (const Metric &rhs)=default
 Copy assign operator. More...
 
Metricoperator= (Metric &&rhs)=default
 Move assign operator. More...
 
virtual ~Metric ()=default
 virtual destructor. More...
 

Detailed Description

Metric that quantifies the difference between predicted values and actual values in terms of mean squared error (MSE).

MSE is defined strictly positive such that smaller values are better.

Member Function Documentation

◆ clone()

Metric * sgpp::datadriven::Accuracy::clone ( ) const
overridevirtual

Polymorphic clone pattern.

Returns
deep copy of this object. New object is owned by caller.

Implements sgpp::datadriven::Metric.

◆ measure()

double sgpp::datadriven::Accuracy::measure ( const DataVector predictedValues,
const DataVector trueValues 
) const
overridevirtual

Quantify the difference between predicted values and actual values in terms of mean squared error.

Parameters
predictedValuesvalues calculated by the model for testing data
trueValuesactual values as taken from the dataset.
Returns
mean squared error (MSE) - strictly positive such that smaller values are better.

Implements sgpp::datadriven::Metric.

References sgpp::base::DataVector::get(), and python.statsfileInfo::i.


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