Public Types | Public Member Functions | Private Member Functions | Private Attributes

cmtk::GeneralLinearModel Class Reference
[cmtkBase Library]

Pixelwise linear modeling and t statistics of data. More...

#include <cmtkGeneralLinearModel.h>

Collaboration diagram for cmtk::GeneralLinearModel:
Collaboration graph
[legend]

List of all members.

Public Types

typedef GeneralLinearModel Self
 This class.
typedef SmartPointer< SelfSmartPtr
 Smart pointer type.

Public Member Functions

 GeneralLinearModel (const size_t nParameters, const size_t nData, const double *designMatrix)
 Constructor.
 ~GeneralLinearModel ()
 Destructor.
double GetSingularValue (const size_t n) const
 Get singular value of the SVD decomposition of the design matrix.
Matrix2D< double > * GetCorrelationMatrix () const
 Get the parameter correlation matrix from design matrix.
void FitModel (std::vector< TypedArray::SmartPtr > &y, const bool normalizeParameters=true)
 Model y[] distribution and return model parameters a[].
TypedArray::SmartPtrGetModel (const size_t n)
 Get pointer to n-th model parameter array.
double GetNormFactor (const size_t p)
 Get normalization factor for parameter number 'p'.
TypedArray::SmartPtrGetTStat (const size_t n)
 Get pointer to n-th parameter t statistics array.
TypedArray::SmartPtrGetFStat ()
 Get pointer to n-th parameter t statistics array.

Private Member Functions

void InitResults (const size_t nPixels)
 Initialize results arrays with the correct number of pixels.

Private Attributes

size_t NParameters
 Number of model parameters.
size_t NData
 Number of data items.
Matrix2D< double > DesignMatrix
 Design matrix.
Matrix2D< double > * U
 Matrix U of the design matrix SVD.
std::vector< Matrix2D< double > * > Up
 Array of partial design matrices.
Matrix2D< double > * V
 Matrix V the design matrix SVD.
std::vector< Matrix2D< double > * > Vp
 SVD of partial design matrices.
std::vector< double > * W
 Vector W (workspace).
std::vector< std::vector
< double > * > 
Wp
 Workspace vectors for partial regressions.
std::vector< double > VariableMean
 Means of variables.
std::vector< double > VariableSD
 Standard deviations of variables.
std::vector< TypedArray::SmartPtrModel
 Computed model coefficients.
std::vector< TypedArray::SmartPtrTStat
 Computed model t statistics coefficients.
TypedArray::SmartPtr FStat
 Computed model F statistics.

Detailed Description

Pixelwise linear modeling and t statistics of data.

Note:
This class formerly contained a method for getting the covariance matrix of an SVD. It has been removed due to obsolete implementation (Numerical Recipes) and un-use

Definition at line 59 of file cmtkGeneralLinearModel.h.


Member Typedef Documentation

This class.

Definition at line 63 of file cmtkGeneralLinearModel.h.

Smart pointer type.

Definition at line 66 of file cmtkGeneralLinearModel.h.


Member Function Documentation

TypedArray::SmartPtr& cmtk::GeneralLinearModel::GetFStat (  ) [inline]

Get pointer to n-th parameter t statistics array.

Definition at line 122 of file cmtkGeneralLinearModel.h.

TypedArray::SmartPtr& cmtk::GeneralLinearModel::GetModel ( const size_t  n ) [inline]

Get pointer to n-th model parameter array.

Definition at line 100 of file cmtkGeneralLinearModel.h.

double cmtk::GeneralLinearModel::GetNormFactor ( const size_t  p ) [inline]

Get normalization factor for parameter number 'p'.

Definition at line 106 of file cmtkGeneralLinearModel.h.

double cmtk::GeneralLinearModel::GetSingularValue ( const size_t  n ) const [inline]

Get singular value of the SVD decomposition of the design matrix.

Parameters:
nIndex of the model parameter [0..NParameters-1].
Returns:
The singular value for parameter n.

Definition at line 81 of file cmtkGeneralLinearModel.h.

TypedArray::SmartPtr& cmtk::GeneralLinearModel::GetTStat ( const size_t  n ) [inline]

Get pointer to n-th parameter t statistics array.

Definition at line 116 of file cmtkGeneralLinearModel.h.


Member Data Documentation

Design matrix.

Definition at line 138 of file cmtkGeneralLinearModel.h.

Computed model F statistics.

Definition at line 171 of file cmtkGeneralLinearModel.h.

Computed model coefficients.

Definition at line 165 of file cmtkGeneralLinearModel.h.

Number of data items.

Definition at line 135 of file cmtkGeneralLinearModel.h.

Number of model parameters.

Definition at line 132 of file cmtkGeneralLinearModel.h.

Computed model t statistics coefficients.

Definition at line 168 of file cmtkGeneralLinearModel.h.

Matrix U of the design matrix SVD.

Definition at line 141 of file cmtkGeneralLinearModel.h.

std::vector< Matrix2D<double>* > cmtk::GeneralLinearModel::Up [private]

Array of partial design matrices.

Definition at line 144 of file cmtkGeneralLinearModel.h.

Matrix V the design matrix SVD.

Definition at line 147 of file cmtkGeneralLinearModel.h.

std::vector<double> cmtk::GeneralLinearModel::VariableMean [private]

Means of variables.

Definition at line 159 of file cmtkGeneralLinearModel.h.

std::vector<double> cmtk::GeneralLinearModel::VariableSD [private]

Standard deviations of variables.

Definition at line 162 of file cmtkGeneralLinearModel.h.

std::vector< Matrix2D<double>* > cmtk::GeneralLinearModel::Vp [private]

SVD of partial design matrices.

Definition at line 150 of file cmtkGeneralLinearModel.h.

std::vector<double>* cmtk::GeneralLinearModel::W [private]

Vector W (workspace).

Definition at line 153 of file cmtkGeneralLinearModel.h.

std::vector< std::vector<double>* > cmtk::GeneralLinearModel::Wp [private]

Workspace vectors for partial regressions.

Definition at line 156 of file cmtkGeneralLinearModel.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines