Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ categorical_logit_glm_lpmf() [1/3]

template<bool propto, typename T_y , typename T_x , typename T_alpha , typename T_beta , require_all_prim_or_rev_kernel_expression_t< T_y, T_x, T_alpha, T_beta > * = nullptr>
return_type_t< T_x, T_alpha, T_beta > stan::math::categorical_logit_glm_lpmf ( const T_y &  y,
const T_x &  x,
const T_alpha &  alpha,
const T_beta &  beta 
)

Returns the log PMF of the Generalized Linear Model (GLM) with categorical distribution and logit (softmax) link function.

This is an overload of the GLM in prim/prob/categorical_logit_glm_lpmf.hpp that is implemented in OpenCL.

Template Parameters
T_alphatype of the intercept vector
T_betatype of the matrix of weights
Parameters
ya scalar or vector of classes. If it is a scalar it will be broadcast - used for all instances. Values should be between 1 and number of classes, including endpoints.
xdesign matrix on OpenCL device. This overload does not support broadcasting of a row vector x!
alphaintercept vector (in log odds)
betaweight matrix
Returns
log probability or log sum of probabilities
Exceptions
std::domain_errorx, beta or alpha is infinite or y is not within bounds
std::invalid_argumentif container sizes mismatch.

Definition at line 49 of file categorical_logit_glm_lpmf.hpp.