A single-Poisson Outlier-based model. More...
#include <Surprise/SurpriseModel.H>
Public Member Functions | |
SurpriseModelOD (const double updatefac=0.5, const double sampleval=0.0, const double samplevar=1.0) | |
Constructor. See base class for details. | |
virtual | ~SurpriseModelOD () |
Virtual destructor ensures proper destruction of derived classes. | |
virtual void | reset () |
Reset to initial state. | |
virtual void | init (const double updatefac=0.5, const double sampleval=0.0, const double samplevar=1.0) |
Change intial state parameters. | |
virtual void | load (const double sampleval, const double samplevar=1.0) |
Load given sample mean and variance. | |
virtual double | surprise (const SurpriseModelOD &other) |
Compute surprise between us and another model. | |
virtual void | preComputeHyperParams (const SurpriseModelOD &sample) |
Is empty in this model. | |
virtual void | combineFrom (const Image< SurpriseModelOD > &models, const Image< float > &weights) |
Initialize us as a weighted combination of the given map of models. | |
virtual void | combineFrom (const Image< SurpriseModelOD > &models, const Image< float > &weights, const Point2D< int > &pos, const int width, const int height, const int offset) |
Initialize us as a weighted combination of the given map of models. | |
virtual double | getMean () const |
get our mean | |
virtual double | getVar () const |
get our variance | |
virtual double | getUpdateFac () const |
get our UpdateFac | |
Protected Attributes | |
int | itsN |
our sample N | |
double | itsLambda |
our current Poisson lambda |
A single-Poisson Outlier-based model.
This is not really a true SurpriseModel, but rather an information model based on outlier detection using a single adaptive Poisson model.
Definition at line 705 of file SurpriseModel.H.
SurpriseModelOD::SurpriseModelOD | ( | const double | updatefac = 0.5 , |
|
const double | sampleval = 0.0 , |
|||
const double | samplevar = 1.0 | |||
) |
Constructor. See base class for details.
Definition at line 1371 of file SurpriseModel.C.
SurpriseModelOD::~SurpriseModelOD | ( | ) | [virtual] |
Virtual destructor ensures proper destruction of derived classes.
Definition at line 1380 of file SurpriseModel.C.
void SurpriseModelOD::combineFrom | ( | const Image< SurpriseModelOD > & | models, | |
const Image< float > & | weights, | |||
const Point2D< int > & | pos, | |||
const int | width, | |||
const int | height, | |||
const int | offset | |||
) | [inline, virtual] |
Initialize us as a weighted combination of the given map of models.
Definition at line 1445 of file SurpriseModel.C.
References ASSERT, Image< T >::begin(), Image< T >::coordsOk(), Image< T >::getHeight(), Image< T >::getWidth(), Point2D< T >::i, and itsLambda.
void SurpriseModelOD::combineFrom | ( | const Image< SurpriseModelOD > & | models, | |
const Image< float > & | weights | |||
) | [inline, virtual] |
Initialize us as a weighted combination of the given map of models.
Definition at line 1424 of file SurpriseModel.C.
References ASSERT, Image< T >::begin(), Image< T >::end(), Image< T >::isSameSize(), and itsLambda.
double SurpriseModelOD::getMean | ( | ) | const [inline, virtual] |
get our mean
Implements SurpriseModel.
Definition at line 1482 of file SurpriseModel.C.
References itsLambda.
double SurpriseModelOD::getUpdateFac | ( | ) | const [inline, virtual] |
get our UpdateFac
Implements SurpriseModel.
Definition at line 1490 of file SurpriseModel.C.
References SurpriseModel::itsUpdateFac.
double SurpriseModelOD::getVar | ( | ) | const [inline, virtual] |
get our variance
Implements SurpriseModel.
Definition at line 1486 of file SurpriseModel.C.
References itsLambda.
void SurpriseModelOD::init | ( | const double | updatefac = 0.5 , |
|
const double | sampleval = 0.0 , |
|||
const double | samplevar = 1.0 | |||
) | [inline, virtual] |
Change intial state parameters.
Reimplemented from SurpriseModel.
Definition at line 1388 of file SurpriseModel.C.
References load().
void SurpriseModelOD::load | ( | const double | sampleval, | |
const double | samplevar = 1.0 | |||
) | [inline, virtual] |
Load given sample mean and variance.
Implements SurpriseModel.
Definition at line 1397 of file SurpriseModel.C.
References itsLambda.
void SurpriseModelOD::preComputeHyperParams | ( | const SurpriseModelOD & | sample | ) | [inline, virtual] |
Is empty in this model.
Definition at line 1420 of file SurpriseModel.C.
void SurpriseModelOD::reset | ( | void | ) | [inline, virtual] |
Reset to initial state.
Implements SurpriseModel.
Definition at line 1384 of file SurpriseModel.C.
References SurpriseModel::itsInitialVal, SurpriseModel::itsInitialVar, and load().
double SurpriseModelOD::surprise | ( | const SurpriseModelOD & | other | ) | [inline, virtual] |
Compute surprise between us and another model.
Definition at line 1404 of file SurpriseModel.C.
References itsLambda, SurpriseModel::itsUpdateFac, and poisson().
double SurpriseModelOD::itsLambda [protected] |
our current Poisson lambda
Definition at line 752 of file SurpriseModel.H.
Referenced by combineFrom(), getMean(), getVar(), load(), and surprise().
int SurpriseModelOD::itsN [protected] |
our sample N
Definition at line 751 of file SurpriseModel.H.