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

◆ categorical_logit_glm_lpmf() [2/3]

template<bool propto, typename T_y , typename T_x , typename T_alpha , typename T_beta , require_matrix_t< T_x > * = nullptr, require_col_vector_t< T_alpha > * = nullptr, require_matrix_t< 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.

Template Parameters
T_ytype of classes. It can be either std::vector<int> or int.
T_x_scalartype of the matrix of independent variables (features)
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 or row vector. If it is a row vector it will be broadcast - used for all instances.
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 47 of file categorical_logit_glm_lpmf.hpp.