sgpp::datadriven::NegativeLogLikelihood Class Reference

Metric that quantifies the likelihood of a dataset given the density function. More...

#include <NegativeLogLikelihood.hpp>

Inheritance diagram for sgpp::datadriven::NegativeLogLikelihood:

Public Member Functions

Metricclone () const override
 Standard clone method. More...
double measure (const DataVector &predictedValues, const DataVector &trueValues) const override
 Quantify the NLL of the predicted values (i.e. 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 likelihood of a dataset given the density function.

The smaller the negative log likelihood the better the fit

Member Function Documentation

Metric * sgpp::datadriven::NegativeLogLikelihood::clone ( ) const

Standard clone method.

the cloned metric instance

Implements sgpp::datadriven::Metric.

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

Quantify the NLL of the predicted values (i.e.

adding the logs of the predicted values and ignorign the true values). Note that probabilities <= 0 are simply ignored (the model can provide those)

predictedValuesprobabilites calculated by the model for testing data
the negative log likelihood of the predicted probabilities

Implements sgpp::datadriven::Metric.

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

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