SG++
sgpp::datadriven::MSE Class Reference

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

#include <MSE.hpp>

Inheritance diagram for sgpp::datadriven::MSE:
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

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

Polymorphic clone pattern.

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

Implements sgpp::datadriven::Metric.

double sgpp::datadriven::MSE::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::getSize(), sgpp::base::DataVector::l2Norm(), sgpp::base::DataVector::sub(), and analyse_erg::tmp.


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