SG++-Doxygen-Documentation
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:
sgpp::datadriven::Metric

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

◆ clone()

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

Standard clone method.

Returns
the cloned metric instance

Implements sgpp::datadriven::Metric.

◆ measure()

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

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)

Parameters
predictedValuesprobabilites calculated by the model for testing data
trueValuesignored
Returns
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: