genestboost
0.3.1

Contents:

  • Introduction
  • Quick Coding Example
  • Additional Examples
  • Custom Link Functions
  • Custom Loss Functions
  • Model Callbacks
  • Weak Learners
  • genestboost
    • genestboost package
      • Subpackages
        • genestboost.link_functions package
        • genestboost.loss_functions package
        • genestboost.utils package
        • genestboost.weak_learners package
  • Installation
  • Changelog
  • GitHub Repo
genestboost
  • »
  • genestboost »
  • genestboost package »
  • genestboost.link_functions package
  • View page source

genestboost.link_functions package¶

Link functions module - contains link functions for boosting.

class genestboost.link_functions.BaseLink[source]¶

Bases: abc.ABC

Abstract base class for link functions.

abstract d2ydeta2(y)[source]¶

Get the second derivative of y with respect to the link as a function of y.

abstract dydeta(y)[source]¶

Get the derivative of y with respect to the link as a function of y.

class genestboost.link_functions.CLogLogLink(eps=1e-10)[source]¶

Bases: genestboost.link_functions.base_class.BaseLink

Complementary log-log link function implementation.

__init__(eps=1e-10)[source]¶

Class initializer.

Extends the BaseLink class initializer.

eps: float (default = 1e-10)

A small constant float to prevent log from returning negative infinity.

d2ydeta2(y)[source]¶

Get the second derivative of y with respect to the link as a function of y.

Overrides BaseLink.d2ydeta2.

dydeta(y)[source]¶

Get the derivative of y with respect to the link as a function of y.

Overrides BaseLink.dydeta.

class genestboost.link_functions.CubeRootLink[source]¶

Bases: genestboost.link_functions.power_links.PowerLink

Cube root link function implementation.

__init__()[source]¶

Class initializer.

Extends PowerLink class initializer by specifying power=1/3 and summand=0.0.

class genestboost.link_functions.IdentityLink[source]¶

Bases: genestboost.link_functions.base_class.BaseLink

Implementation of the IdentityLink function.

d2ydeta2(y)[source]¶

Get the second derivative of y with respect to the link as a function of y.

Overrides BaseLink.d2ydeta2.

dydeta(y)[source]¶

Get the derivative of y with respect to the link as a function of y.

Overrides BaseLink.dydeta.

class genestboost.link_functions.LogLink(summand=0.0)[source]¶

Bases: genestboost.link_functions.base_class.BaseLink

Implementation of the log link function.

__init__(summand=0.0)[source]¶

Class initializer.

Extends the BaseLink class intializer.

Parameters

summand (float) – Summand of the log in the link implementation - i.e., link = log(y + summand).

d2ydeta2(y)[source]¶

Get the second derivative of y with respect to the link as a function of y.

Overrides BaseLink.d2ydeta2.

dydeta(y)[source]¶

Get the derivative of y with respect to the link as a function of y.

Overrides BaseLink.dydeta.

class genestboost.link_functions.LogitLink[source]¶

Bases: genestboost.link_functions.base_class.BaseLink

Implementation of the logit link function.

d2ydeta2(y)[source]¶

Get the second derivative of y with respect to the link as a function of y.

Overrides BaseLink.d2ydeta2.

dydeta(y)[source]¶

Get the derivative of y with respect to the link as a function of y.

Overrides BaseLink.dydeta.

class genestboost.link_functions.Logp1Link[source]¶

Bases: genestboost.link_functions.log_links.LogLink

Log plus 1 link function implementation.

__init__()[source]¶

Class initializer extends LogLink initializer, setting summand equal to 1.0.

class genestboost.link_functions.PowerLink(power, summand=0.0)[source]¶

Bases: genestboost.link_functions.base_class.BaseLink

Implementation of power link functions.

__init__(power, summand=0.0)[source]¶

Initialize a power link instance - i.e., link = (y + summand) ** power.

Extends BaseLink class intializer.

Parameters
  • power (float or int) – Exponent of the link function.

  • summand (float or int) – Summand of the link function.

d2ydeta2(y)[source]¶

Get the second derivative of y with respect to the link as a function of y.

Overrides BaseLink.d2ydeta2.

dydeta(y)[source]¶

Get the derivative of y with respect to the link as a function of y.

Overrides BaseLink.dydeta.

class genestboost.link_functions.ReciprocalLink(summand=0.0)[source]¶

Bases: genestboost.link_functions.power_links.PowerLink

Inverse link function implementation.

__init__(summand=0.0)[source]¶

Class initializer.

Extends PowerLink class initializer by specifying power=-1 and summand=0.0.

class genestboost.link_functions.SqrtLink[source]¶

Bases: genestboost.link_functions.power_links.PowerLink

Square root link function implementation.

__init__()[source]¶

Class initializer.

Extends PowerLink class intializer by specifying power=0.5 and summand=0.0.

Next Previous

© Copyright 2021, Benjamin Cross.

Built with Sphinx using a theme provided by Read the Docs.