Medical Imaging Interaction Toolkit  2018.4.99-ae21cdc4
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 30 of file mitkGeneralizedLinearModel.h.

Constructor & Destructor Documentation

◆ GeneralizedLinearModel()

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.

Member Function Documentation

◆ B()

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

Returns the b-Vector for the estimation.

◆ ExpMu()

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.

◆ Predict() [1/2]

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.

◆ Predict() [2/2]

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.


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