adelie.glm.binomial#
- adelie.glm.binomial(y: ndarray, *, weights: ndarray | None = None, link: str = 'logit', dtype: float32 | float64 | None = None)[source]#
Creates a Binomial GLM family object.
The Binomial GLM family with the logit link function specifies the loss function as:
The link function is given by
The Binomial GLM family with the probit link function specifies the loss function as:
where
is the standard normal CDF. The link function is given byWe assume that
.- Parameters:
- y(n,) ndarray
Response vector
.- weights(n,) ndarray, optional
Observation weights
. Weights are normalized such that they sum to1
. Default isNone
, in which case, it is set tonp.full(n, 1/n)
.- linkstr, optional
The link function type. It must be one of the following:
"logit"
: the logit link function."probit"
: the probit link function.
Default is
"logit"
.- dtypeUnion[float32, float64], optional
The underlying data type. If
None
, it is inferred fromy
, in which casey
must have an underlying data type ofnumpy.float32
ornumpy.float64
. Default isNone
.
- Returns:
- glm
Binomial GLM object.