ITK
6.0.0
Insight Toolkit
|
#include <itkProbabilityDistribution.h>
ProbabilityDistribution class defines common interface for statistical distributions (pdfs, cdfs, etc.).
ProbabilityDistribution defines a common interface for parametric and non-parametric distributions. ProbabilityDistribution provides access to the probability density function (pdf), the cumulative distribution function (cdf), and the inverse cumulative distribution function.
ProbabilityDistribution also defines an abstract interface for setting parameters of distribution (mean/variance for a Gaussian, degrees of freedom for Student-t, etc.).
Note that nonparametric subclasses of ProbabilityDistribution are possible. For instance, a nonparametric implementation may use a histogram or kernel density function to model the distribution.
The EvaluatePDF(), EvaluateCDF, EvaluateInverseCDF() methods are all virtual, allowing algorithms to be written with an abstract interface to a distribution (with said distribution provided to the algorithm at run-time). Static methods, not requiring an instance of the distribution, are also allowed. The static methods allow for optimized access to distributions when the distribution is known a priori to the algorithm.
ProbabilityDistributions are univariate. Multivariate versions may be provided under a separate superclass (since the parameters to the pdf and cdf would have to be vectors not scalars). Perhaps this class will be named MultivariateProbabilityDistribution.
ProbabilityDistributions can be used for standard statistical tests: Z-scores, t-tests, chi-squared tests, F-tests, etc.
Definition at line 72 of file itkProbabilityDistribution.h.
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | ParametersType = Array< double > |
using | Pointer = SmartPointer< Self > |
using | Self = ProbabilityDistribution |
using | Superclass = Object |
Public Types inherited from itk::Object | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = Object |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
Public Member Functions | |
virtual double | EvaluateCDF (double x) const =0 |
virtual double | EvaluateCDF (double x, const ParametersType &) const =0 |
virtual double | EvaluateInverseCDF (double p) const =0 |
virtual double | EvaluateInverseCDF (double p, const ParametersType &) const =0 |
virtual double | EvaluatePDF (double x) const =0 |
virtual double | EvaluatePDF (double x, const ParametersType &) const =0 |
virtual double | GetMean () const =0 |
const char * | GetNameOfClass () const override |
virtual SizeValueType | GetNumberOfParameters () const =0 |
virtual const ParametersType & | GetParameters () const |
virtual double | GetVariance () const =0 |
virtual bool | HasMean () const =0 |
virtual bool | HasVariance () const =0 |
virtual void | SetParameters (const ParametersType ¶ms) |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual Pointer | CreateAnother () const |
virtual void | Delete () |
virtual const char * | GetNameOfClass () const |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ProbabilityDistribution () | |
~ProbabilityDistribution () override | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Protected Attributes | |
ParametersType | m_Parameters {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Definition at line 81 of file itkProbabilityDistribution.h.
using itk::Statistics::ProbabilityDistribution::ParametersType = Array<double> |
Type of the parameter vector.
Definition at line 87 of file itkProbabilityDistribution.h.
Definition at line 80 of file itkProbabilityDistribution.h.
Standard class type aliases
Definition at line 78 of file itkProbabilityDistribution.h.
Definition at line 79 of file itkProbabilityDistribution.h.
|
protected |
|
overrideprotected |
|
pure virtual |
Evaluate the cumulative distribution function (cdf). The parameters of the distribution are assigned via SetParameters(). See concrete subclasses for the ordering of parameters.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Evaluate the cumulative distribution function (cdf). The parameters for the distribution are passed as a parameters vector. See concrete subclasses for the ordering of parameters.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Evaluate the inverse cumulative distribution function (inverse cdf). Parameter p must be between 0.0 and 1.0. The parameters of the distribution are assigned via SetParameters(). See concrete subclasses for the ordering of parameters.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Evaluate the inverse cumulative distribution function (inverse cdf). Parameter p must be between 0.0 and 1.0. The parameters for the distribution are passed as a parameters vector. See concrete subclasses for the ordering of parameters.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Evaluate the probability density function (pdf). The parameters of the distribution are assigned via SetParameters().
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Evaluate the probability density function (pdf). The parameters for the distribution are passed as a parameters vector. See concrete subclasses for the ordering of parameters.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Get the mean of the distribution. If the mean does not exist, then quiet_NaN may is returned.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
overridevirtual |
Reimplemented from itk::Object.
Reimplemented in itk::Statistics::TDistribution.
|
pure virtual |
Return the number of parameters that describe the distribution. For nonparametric distributions, this will be a function of the number of samples.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
virtual |
Get the parameters of the distribution. See concrete subclasses for the order of parameters. Subclasses may provide convenience methods for setting parameters, i.e. SetDegreesOfFreedom(), etc.
|
pure virtual |
Get the variance of the distribution. If the variance does not exist, then quiet_NaN is returned.
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Does this distribution have a mean?
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
pure virtual |
Does this distribution have a variance?
Implemented in itk::Statistics::ChiSquareDistribution, itk::Statistics::GaussianDistribution, and itk::Statistics::TDistribution.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::Object.
Reimplemented in itk::Statistics::TDistribution.
|
virtual |
Set the parameters of the distribution. See concrete subclasses for the order of the parameters. Subclasses may provide convenience methods for setting parameters, i.e. SetDegreesOfFreedom(), etc.
|
protected |
Definition at line 167 of file itkProbabilityDistribution.h.