A library for working with phylogenetic and population genetic data.
v0.32.0
GlmFamily Struct Reference

#include <genesis/utils/math/regression/family.hpp>

Detailed Description

Definition at line 48 of file family.hpp.

Public Types

enum  Family {
  kUnknown, kBinomial, kPoisson, kGaussian,
  kGamma
}
 List of common GLM Families. More...
 

Public Attributes

std::function< GlmLink()> canonical_link
 Get the canonical link function. More...
 
GlmLink::Link canonical_link_id = GlmLink::kUnknown
 Internal ID of the GlmLink, used to check if the link is the canonical one for a given distribution family. More...
 
Family id = kUnknown
 Internal ID of the GlmFamily, used to check for specific families where needed. More...
 
std::function< double(double y, double mu)> log_likelihood
 Log-Likelihood contribution of a value. To be multiplied by prior weight. More...
 
std::function< double(double mu)> rectify
 Rectify to a valid value, for the fitted mean, to avoid extreme predictions. More...
 
std::function< double(double y, double mu)> unit_deviance
 Unit deviance for the distribution family. More...
 
std::function< double(double mu)> variance
 Variance function for the distribution family. More...
 

Member Enumeration Documentation

◆ Family

enum Family

List of common GLM Families.

Enumerator
kUnknown 
kBinomial 
kPoisson 
kGaussian 
kGamma 

Definition at line 53 of file family.hpp.

Member Data Documentation

◆ canonical_link

std::function<GlmLink()> canonical_link

Get the canonical link function.

Definition at line 95 of file family.hpp.

◆ canonical_link_id

GlmLink::Link canonical_link_id = GlmLink::kUnknown

Internal ID of the GlmLink, used to check if the link is the canonical one for a given distribution family.

Definition at line 70 of file family.hpp.

◆ id

Internal ID of the GlmFamily, used to check for specific families where needed.

Definition at line 64 of file family.hpp.

◆ log_likelihood

std::function<double( double y, double mu )> log_likelihood

Log-Likelihood contribution of a value. To be multiplied by prior weight.

Definition at line 80 of file family.hpp.

◆ rectify

std::function<double( double mu )> rectify

Rectify to a valid value, for the fitted mean, to avoid extreme predictions.

Definition at line 85 of file family.hpp.

◆ unit_deviance

std::function<double( double y, double mu )> unit_deviance

Unit deviance for the distribution family.

Definition at line 90 of file family.hpp.

◆ variance

std::function<double( double mu )> variance

Variance function for the distribution family.

Definition at line 75 of file family.hpp.


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