#include <itkGoodnessOfFitComponentBase.h>
Inheritance diagram for itk::Statistics::GoodnessOfFitComponentBase< TInputSample >:
Public Types | |
typedef GoodnessOfFitComponentBase | Self |
typedef Object | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef TInputSample | InputSampleType |
typedef TInputSample::MeasurementType | MeasurementType |
typedef TInputSample::MeasurementVectorType | MeasurementVectorType |
typedef Subsample< TInputSample > | ResampledSampleType |
typedef Histogram< float, 1 > | HistogramType |
typedef HistogramType::Pointer | HistogramPointer |
typedef Array< double > | ParametersType |
typedef FixedArray< double, itkGetStaticConstMacro(MeasurementVectorSize) | CenterType ) |
typedef double | RadiusType |
typedef Vector< double, itkGetStaticConstMacro(MeasurementVectorSize) | MeanType ) |
typedef double | StandardDeviationType |
Public Member Functions | |
virtual const char * | GetClassName () const |
itkStaticConstMacro (MeasurementVectorSize, unsigned int, TInputSample::MeasurementVectorSize) | |
virtual unsigned int | GetNumberOfParameters () const =0 |
void | SetUseExpectedHistogram (bool flag) |
virtual CenterType * | GetCenter ()=0 |
virtual RadiusType * | GetRadius ()=0 |
virtual MeanType * | GetMean ()=0 |
virtual RadiusType * | GetStandardDeviation ()=0 |
virtual void | CreateHistograms () |
virtual void | Resample () |
ResampledSampleType * | GetResampledSample () |
virtual unsigned int | GetResampledSampleSize () |
virtual void | CalculateProjectionAxes ()=0 |
virtual void | Project (int projectionAxisIndex) |
virtual void | UpdateExpectedHistogram () |
double * | GetTotalObservedScale () |
virtual double | GetCumulativeProbability (double x) const =0 |
virtual double | GetProbabilityDensity (MeasurementVectorType &measurements) const =0 |
virtual double | GetProportion () const |
HistogramPointer | GetObservedHistogram () |
HistogramPointer | GetExpectedHistogram () |
virtual void | PrintParameters (std::ostream &os) const =0 |
virtual ParametersType | GetFullParameters () const =0 |
virtual void | SetInputSample (TInputSample *sample) |
TInputSample * | GetInputSample () |
virtual void | SetParameters (const ParametersType ¶meters) |
ParametersType * | GetParameters () |
void | SetHistogramNumberOfBins (int numberOfBins) |
int | GetHistogramNumberOfBins () |
void | SetHistogramUseEquiProbableBins (bool flag) |
bool | GetHistogramUseEquiProbableBins () |
void | SetHistogramBinOverlap (double overlap) |
double | GetHistogramBinOverlap () |
void | SetHistogramExtent (double extent) |
double | GetHistogramExtent () |
Protected Types | |
typedef NeighborhoodSampler< TInputSample > | ResamplerType |
typedef SampleToHistogramProjectionFilter< ResampledSampleType, float > | ProjectorType |
typedef FixedArray< double, itkGetStaticConstMacro(MeasurementVectorSize) | ProjectionAxisType ) |
typedef FixedArray< ProjectionAxisType, itkGetStaticConstMacro(MeasurementVectorSize) | ProjectionAxisArrayType ) |
Protected Member Functions | |
GoodnessOfFitComponentBase () | |
virtual | ~GoodnessOfFitComponentBase () |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
ProjectionAxisArrayType * | GetProjectionAxes () |
virtual void | CreateEquiRangeBins () |
virtual void | CreateEquiProbableBins () |
This defines common iterfaces for each subclasses and provides common functionalities across different types of components (e.g. GaussianGoodnessOfFitComponent)
The primary role of a GoodnessOfFitComponent is to create an 1D histogram (called an observed histogram ) of the input sample after resampling the input using spherical kernel and projecting the resampled sample along base axes, and to create corresponding 1D histogram (expected histogram) that has the same histogram configuration as the observed histogram but has the expected frequencies from the given component parameters.
You can set up the two histograms' configuration by calling SetHistogramNumberOfBins, SetHistogramUseEquiProbableBins, SetHistogramBingOverlap, SetHistogramExtent. After you change the histogram configuration, call the CreateHistograms method to allocate histograms. If you set the UseExpectedHistogram flag to false by callsing SetUseExpectedHistogram(false), the CreateHistograms method won't create the expected histogram. The decision should be made by the GoodnessOfFitFunction object that will be plugged-in to the GoodnessOfFitMixtureModelCostFunction. So the method shouldn't be called manually.
This base class provides default implementations for the resampling and projection using helper classes (NeighborhoodSampler, SampleToHistogramProjectionFilter).
To determine the base axis, call the CalculateProjectionAxes method. each subclass should implement it.
Another group of functions includes probability function such as GetProbabilityDensity(MeasurementVectorType) multivariate probability density function of the subclass GetCumulativeProbability(MeasurementType) univariate cumulative probabilty function
To see how all this methods are used in order, take a look at the implementation of the GetValue method of the GoodnessOfFitMixtureModelCostFunction class.
Definition at line 80 of file itkGoodnessOfFitComponentBase.h.
|
Type of the center position for the hyperspherical neighborhood sampling Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 118 of file itkGoodnessOfFitComponentBase.h. |
|
Reimplemented from itk::Object.
Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 88 of file itkGoodnessOfFitComponentBase.h. |
|
Definition at line 109 of file itkGoodnessOfFitComponentBase.h. |
|
Histogram type that will be used for observed and expected histogram Definition at line 108 of file itkGoodnessOfFitComponentBase.h. |
|
TInputSample type alias Definition at line 94 of file itkGoodnessOfFitComponentBase.h. |
|
Type of the mean of the distribution Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 125 of file itkGoodnessOfFitComponentBase.h. Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramExtent(). |
|
Typedefs from the TInputSample Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 101 of file itkGoodnessOfFitComponentBase.h. |
|
Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 102 of file itkGoodnessOfFitComponentBase.h. Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetTotalObservedScale(). |
|
Type of the array of component parameters Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 112 of file itkGoodnessOfFitComponentBase.h. |
|
Reimplemented from itk::Object.
Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 87 of file itkGoodnessOfFitComponentBase.h. |
|
projection axis array type. The type of output from CalculateProjectionAxis(). The number of projection axis are fixed equal to the number of components of a measurement vector Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 260 of file itkGoodnessOfFitComponentBase.h. |
|
projection axis array type. The type of output from CalculateProjectionAxis(). The number of projection axis are fixed equal to the number of components of a measurement vector Definition at line 257 of file itkGoodnessOfFitComponentBase.h. |
|
default projection filter type Definition at line 250 of file itkGoodnessOfFitComponentBase.h. |
|
Type of the radius of the hyperspherical neighborhood sampling Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 121 of file itkGoodnessOfFitComponentBase.h. Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramExtent(). |
|
Resample() output type Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 105 of file itkGoodnessOfFitComponentBase.h. Referenced by itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::GetHistogramExtent(). |
|
default resampler type and realted types Definition at line 246 of file itkGoodnessOfFitComponentBase.h. |
|
Standard class typedefs Reimplemented from itk::Object.
Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 85 of file itkGoodnessOfFitComponentBase.h. |
|
Type of standard deviation of the distribution Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 128 of file itkGoodnessOfFitComponentBase.h. |
|
Reimplemented from itk::Object.
Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >. Definition at line 86 of file itkGoodnessOfFitComponentBase.h. |
|
|
|
|
|
Calculates the longest axis based on eigen analysis Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Creates an empty histogram with bins having same probability based on the distribution parameters |
|
Creates an empty histogram with bins having same interval |
|
Generates the histogram (expected and observed) |
|
Gets the center position for the neighborhood sampling Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Run-time type information (and related methods). Reimplemented from itk::Object.
Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Gets the probability of x. univariate function Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Gets the expected historm |
|
Gest the parameters of this component Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Set/Get the overlapping effects extent. Definition at line 164 of file itkGoodnessOfFitComponentBase.h. |
|
Set/Gets the extent of histogram from the mean in terms of standard deivation Definition at line 171 of file itkGoodnessOfFitComponentBase.h. References itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeanType, itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::RadiusType, and itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::ResampledSampleType. |
|
Set/Gets the nubmer of bins of histograms (expected and observed) Definition at line 150 of file itkGoodnessOfFitComponentBase.h. |
|
Set/Gets the flag that indicates the probability of each bins in the histograms should be equal. This can be achieved by varying the interval of bins. Definition at line 158 of file itkGoodnessOfFitComponentBase.h. |
|
Set/Gets the input sample |
|
Gets the mean of the distribution Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Gets the total number of parameters for this component Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Gets the observed historm |
|
Set/Gets the component parameters Definition at line 140 of file itkGoodnessOfFitComponentBase.h. |
|
Gets the probability density of measurements. multivariate function Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Definition at line 263 of file itkGoodnessOfFitComponentBase.h. |
|
Gets the proportion of this component among multiple components. Definition at line 225 of file itkGoodnessOfFitComponentBase.h. |
|
Gets the radius for the neighborhood sampling Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Gets the sampled data set Definition at line 194 of file itkGoodnessOfFitComponentBase.h. |
|
Gest the size of the sampled data set |
|
Gets the standard deviation of the distribution Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Gets the total scale of the observed histogram Definition at line 212 of file itkGoodnessOfFitComponentBase.h. References itk::Statistics::GoodnessOfFitComponentBase< TInputSample >::MeasurementVectorType. |
|
Vector length constant Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Prints component parameters. For debugging Implemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
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::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Projects measurement vectors onto the projection axis calculated by the CalculateProjectionAxes method. |
|
Samples measurement vectors using the center and radius |
|
Set/Get the overlapping effects extent. |
|
Set/Gets the extent of histogram from the mean in terms of standard deivation |
|
Set/Gets the nubmer of bins of histograms (expected and observed) |
|
Set/Gets the flag that indicates the probability of each bins in the histograms should be equal. This can be achieved by varying the interval of bins. |
|
Set/Gets the input sample |
|
Set/Gets the component parameters Reimplemented in itk::Statistics::GaussianGoodnessOfFitComponent< TInputSample >.
|
|
Sets the flag that indicates this component uses the histogram generated with expected distribution from the parameters. |
|
Fills up the expected histogram based on the distribution parameters |