Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
JFIT::JMEstimatorNormalWithBackground Struct Reference

Normal M-estimator with background. More...

#include <JMEstimator.hh>

Inheritance diagram for JFIT::JMEstimatorNormalWithBackground:
JFIT::JMEstimator

Public Member Functions

 JMEstimatorNormalWithBackground (const double p)
 Constructor.
 
virtual double getRho (const double z) const override
 Get maximum likelihood estimate.
 
virtual double getPsi (const double z) const override
 Get derivative of maximum likelihood estimate.
 

Public Attributes

double p
 

Detailed Description

Normal M-estimator with background.

Definition at line 152 of file JMEstimator.hh.

Constructor & Destructor Documentation

◆ JMEstimatorNormalWithBackground()

JFIT::JMEstimatorNormalWithBackground::JMEstimatorNormalWithBackground ( const double p)
inline

Constructor.

Parameters
pbackground probability

Definition at line 160 of file JMEstimator.hh.

160 :
161 p(p)
162 {}

Member Function Documentation

◆ getRho()

virtual double JFIT::JMEstimatorNormalWithBackground::getRho ( const double z) const
inlineoverridevirtual

Get maximum likelihood estimate.

Parameters
zdeviation
Returns
likelihood

Implements JFIT::JMEstimator.

Definition at line 164 of file JMEstimator.hh.

165 {
166 const double w = exp(-0.5*z*z);
167
168 return -log(w + p);
169 }
data_type w[N+1][M+1]
Definition JPolint.hh:867

◆ getPsi()

virtual double JFIT::JMEstimatorNormalWithBackground::getPsi ( const double z) const
inlineoverridevirtual

Get derivative of maximum likelihood estimate.

Parameters
zdeviation
Returns
derivative

Implements JFIT::JMEstimator.

Definition at line 171 of file JMEstimator.hh.

172 {
173 const double w = exp(-0.5*z*z);
174
175 return z * w / (w + p);
176 }

Member Data Documentation

◆ p

double JFIT::JMEstimatorNormalWithBackground::p

Definition at line 178 of file JMEstimator.hh.


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