Medical Imaging Interaction Toolkit  2022.04.99-01b95b17 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.

## ◆ 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
 xData The input data matrix. yData The output data matrix. The values of y must meet the requirements of the link and distribution. addConstantColumn Default=True. If True an constant value is added to each row allowing a constant factor in the model.

## ◆ B()

 vnl_vector mitk::GeneralizedLinearModel::B ( )

Returns the b-Vector for the estimation.

## ◆ ExpMu()

 vnl_vector 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!

Parameters
 c Column for which the data is guessed.

## ◆ Predict() [2/2]

 vnl_vector 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!

Parameters
 x Matrix for which the data is guessed.

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