ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::Statistics::MaximumRatioDecisionRule Class Reference

#include <itkMaximumRatioDecisionRule.h>

Detailed Description

A decision rule that operates as a frequentest's approximation to Bayes rule.

MaximumRatioDecisionRule returns the class label using a Bayesian style decision rule. The discriminant scores are evaluated in the context of class priors. If the discriminant scores are actual conditional probabilities (likelihoods) and the class priors are actual a priori class probabilities, then this decision rule operates as Bayes rule, returning the class \(i\) if \(p(x|i) p(i) > p(x|j) p(j)\) for all class \(j\). The discriminant scores and priors are not required to be true probabilities.

This class is named the MaximumRatioDecisionRule as it can be implemented as returning the class \(i\) if \(\frac{p(x|i)}{p(x|j)} > \frac{p(j)}{p(i)}\) for all class \(j\).

A priori values need to be set before calling the Evaluate method. If they are not set, a uniform prior is assumed.

See also
MaximumDecisionRule, MinimumDecisionRule
Examples
Examples/Statistics/BayesianPluginClassifier.cxx, and Examples/Statistics/MaximumRatioDecisionRule.cxx.

Definition at line 59 of file itkMaximumRatioDecisionRule.h.

+ Inheritance diagram for itk::Statistics::MaximumRatioDecisionRule:
+ Collaboration diagram for itk::Statistics::MaximumRatioDecisionRule:

Public Types

using ClassIdentifierType = Superclass::ClassIdentifierType
 
using MembershipValueType = Superclass::MembershipValueType
 
using MembershipVectorType = Superclass::MembershipVectorType
 
using Pointer = SmartPointer<Self>
 
using PriorProbabilityValueType = MembershipValueType
 
using PriorProbabilityVectorSizeType = PriorProbabilityVectorType::size_type
 
using PriorProbabilityVectorType = std::vector<PriorProbabilityValueType>
 
using Self = MaximumRatioDecisionRule
 
using Superclass = DecisionRule
 
- Public Types inherited from itk::Statistics::DecisionRule
using ClassIdentifierType = MembershipVectorType::size_type
 
using ConstPointer = SmartPointer<const Self>
 
using MembershipValueType = double
 
using MembershipVectorType = std::vector<MembershipValueType>
 
using Pointer = SmartPointer<Self>
 
using Self = DecisionRule
 
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::itk::LightObject::Pointer CreateAnother () const
 
ClassIdentifierType Evaluate (const MembershipVectorType &discriminantScores) const override
 
const char * GetNameOfClass () const override
 
virtual const PriorProbabilityVectorTypeGetPriorProbabilities () const
 
void SetPriorProbabilities (const PriorProbabilityVectorType &p)
 
- 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
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () 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 void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- 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 ()
 

Protected Member Functions

 MaximumRatioDecisionRule ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~MaximumRatioDecisionRule () override=default
 
- Protected Member Functions inherited from itk::Statistics::DecisionRule
 DecisionRule ()
 
 ~DecisionRule () 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 PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

PriorProbabilityVectorType m_PriorProbabilities {}
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ClassIdentifierType

◆ MembershipValueType

Types for discriminant values and vectors.

Definition at line 76 of file itkMaximumRatioDecisionRule.h.

◆ MembershipVectorType

◆ Pointer

◆ PriorProbabilityValueType

◆ PriorProbabilityVectorSizeType

Definition at line 85 of file itkMaximumRatioDecisionRule.h.

◆ PriorProbabilityVectorType

◆ Self

Standard class type aliases

Definition at line 65 of file itkMaximumRatioDecisionRule.h.

◆ Superclass

Constructor & Destructor Documentation

◆ MaximumRatioDecisionRule()

itk::Statistics::MaximumRatioDecisionRule::MaximumRatioDecisionRule ( )
protected

Referenced by GetNameOfClass().

◆ ~MaximumRatioDecisionRule()

itk::Statistics::MaximumRatioDecisionRule::~MaximumRatioDecisionRule ( )
overrideprotecteddefault

Member Function Documentation

◆ CreateAnother()

virtual::itk::LightObject::Pointer itk::Statistics::MaximumRatioDecisionRule::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LightObject.

◆ Evaluate()

ClassIdentifierType itk::Statistics::MaximumRatioDecisionRule::Evaluate ( const MembershipVectorType & discriminantScores) const
overridevirtual

Evaluate the decision rule \(p(x|i) p(i) > p(x|j) p(j)\). Prior probabilities need to be set before calling Evaluate() using the SetPriorProbabilities() method (otherwise a uniform prior is assumed). Parameter to Evaluate() is the discriminant score in the form of a likelihood \(p(x|i)\).

Implements itk::Statistics::DecisionRule.

◆ GetNameOfClass()

const char * itk::Statistics::MaximumRatioDecisionRule::GetNameOfClass ( ) const
overridevirtual

◆ GetPriorProbabilities()

virtual const PriorProbabilityVectorType & itk::Statistics::MaximumRatioDecisionRule::GetPriorProbabilities ( ) const
virtual

Get the prior probabilities.

◆ New()

static Pointer itk::Statistics::MaximumRatioDecisionRule::New ( )
static

Standard New() method support

◆ PrintSelf()

void itk::Statistics::MaximumRatioDecisionRule::PrintSelf ( std::ostream & os,
Indent indent ) const
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::LightObject.

◆ SetPriorProbabilities()

void itk::Statistics::MaximumRatioDecisionRule::SetPriorProbabilities ( const PriorProbabilityVectorType & p)

Set the prior probabilities used in evaluating \(p(x|i) p(i) > p(x|j) p(j)\). The likelihoods are set using the Evaluate() method. SetPriorProbabilities needs to be called before Evaluate(). If not set, assumes a uniform prior.

Member Data Documentation

◆ m_PriorProbabilities

PriorProbabilityVectorType itk::Statistics::MaximumRatioDecisionRule::m_PriorProbabilities {}
private

Definition at line 114 of file itkMaximumRatioDecisionRule.h.


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