Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::GeneralizedLinearModel Class Reference

Generalized Linear Model that allows linear models for non-gaussian data. More...

#include <mitkGeneralizedLinearModel.h>

Public Member Functions

 GeneralizedLinearModel (const vnl_matrix< double > &xData, const vnl_vector< double > &yData, bool addConstantColumn=true)
 Initialization of the GLM. The parameters needs to be passed at the beginning. More...
 
double Predict (const vnl_vector< double > &c)
 Predicts the value corresponding to the given vector. More...
 
vnl_vector< double > Predict (const vnl_matrix< double > &x)
 Predicts the value corresponding to the given matrix. More...
 
vnl_vector< double > ExpMu (const vnl_matrix< double > &x)
 Estimation of the exponential factor for a given function. More...
 
vnl_vector< double > B ()
 Returns the b-Vector for the estimation. More...
 

Detailed Description

Generalized Linear Model that allows linear models for non-gaussian data.

Generalized linear models are an extension of standard linear models that allow a different apperance of the data. This is for example usefull to calculate Logistic regressions.

Definition at line 34 of file mitkGeneralizedLinearModel.h.

Constructor & Destructor Documentation

mitk::GeneralizedLinearModel::GeneralizedLinearModel ( const vnl_matrix< double > &  xData,
const vnl_vector< double > &  yData,
bool  addConstantColumn = true 
)

Initialization of the GLM. The parameters needs to be passed at the beginning.

Constructor for a GLM. During the creation process the glm model parameter are guessed.

Parameters
xDataThe input data matrix.
yDataThe output data matrix. The values of y must meet the requirements of the link and distribution.
addConstantColumnDefault=True. If True an constant value is added to each row allowing a constant factor in the model.

Definition at line 100 of file mitkGeneralizedLinearModel.cpp.

References _FinalizeBVector(), _InitMuEta(), _UpdatePermXMatrix(), mitk::LogItLinking::DLink(), mitk::LogItLinking::InverseLink(), max(), and mitk::DistSimpleBinominal::SqrtVariance().

Member Function Documentation

vnl_vector< double > mitk::GeneralizedLinearModel::B ( )

Returns the b-Vector for the estimation.

Definition at line 73 of file mitkGeneralizedLinearModel.cpp.

vnl_vector< double > mitk::GeneralizedLinearModel::ExpMu ( const vnl_matrix< double > &  x)

Estimation of the exponential factor for a given function.

Gives the exponential part of a link function. Only suitable for log-it models. This is especially usefull for calculating the weights for transfer learning since it is equal to the weights.

Definition at line 78 of file mitkGeneralizedLinearModel.cpp.

Referenced by mitk::LRDensityEstimation::Update(), and mitk::LRDensityEstimation::WeightsForAll().

double mitk::GeneralizedLinearModel::Predict ( const vnl_vector< double > &  c)

Predicts the value corresponding to the given vector.

From the learned data a guess is given depending on the provided input vector. The value depend on the b-values of the learned model as well as on the chosen link and distribution.

No input validation is done. The data and the learned model might not match!

c Column for which the data is guessed.

Definition at line 34 of file mitkGeneralizedLinearModel.cpp.

References mitk::LogItLinking::InverseLink().

Referenced by mitk::LRDensityEstimation::Predict().

vnl_vector< double > mitk::GeneralizedLinearModel::Predict ( const vnl_matrix< double > &  x)

Predicts the value corresponding to the given matrix.

From the learned data a guess is given depending on the provided input matrix. The value depend on the b-values of the learned model as well as on the chosen link and distribution.

No input validation is done. The data and the learned model might not match!

x Matrix for which the data is guessed.

Definition at line 51 of file mitkGeneralizedLinearModel.cpp.

References mitk::LogItLinking::InverseLink().


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