Stan Math Library
5.0.0
Automatic Differentiation
|
__kernel void stan::math::opencl_kernels::neg_binomial_2_log_glm | ( | __global double * | logp_global, |
__global double * | theta_derivative_global, | ||
__global double * | theta_derivative_sum, | ||
__global double * | phi_derivative_global, | ||
const __global int * | y_global, | ||
const __global double * | x, | ||
const __global double * | alpha, | ||
const __global double * | beta, | ||
const __global double * | phi_global, | ||
const int | N, | ||
const int | M, | ||
const int | is_y_vector, | ||
const int | is_alpha_vector, | ||
const int | is_phi_vector, | ||
const int | need_theta_derivative, | ||
const int | need_theta_derivative_sum, | ||
const int | need_phi_derivative, | ||
const int | need_phi_derivative_sum, | ||
const int | need_logp1, | ||
const int | need_logp2, | ||
const int | need_logp3, | ||
const int | need_logp4 | ||
) |
GPU implementation of Generalized Linear Model (GLM) with Negative-Binomial-2 distribution and log link function.
Must be run with at least N threads and local size equal to LOCAL_SIZE_.
[out] | logp_global | partially summed log probability (1 value per work group) |
[out] | theta_derivative_global | intermediate variable used in the model |
[out] | theta_derivative_sum | partially summed theta_derivative_global (1 value per work group) |
[out] | phi_derivative_global | derivative with respect to phi |
[in] | y_global | failures count vector parameter |
[in] | x | design matrix |
[in] | alpha | intercept (in log odds) |
[in] | beta | weight vector |
[in] | phi_global | (vector of) precision parameter(s) |
N | number of cases | |
M | number of attributes | |
is_y_vector | 0 or 1 - whether y is a vector (alternatively it is a scalar) | |
is_alpha_vector | 0 or 1 - whether alpha is a vector (alternatively it is a scalar) | |
is_phi_vector | 0 or 1 - whether phi is a vector (alternatively it is a scalar) | |
need_theta_derivative | whether theta_derivative needs to be computed | |
need_theta_derivative_sum | whether theta_derivative_sum needs to be computed | |
need_phi_derivative | whether phi_derivative needs to be computed | |
need_phi_derivative_sum | whether phi_derivative_sum needs to be computed | |
need_logp1 | interpreted as boolean - whether first part logp_global needs to be computed | |
need_logp2 | interpreted as boolean - whether second part logp_global needs to be computed | |
need_logp3 | interpreted as boolean - whether third part logp_global needs to be computed | |
need_logp4 | interpreted as boolean - whether fourth part logp_global needs to be computed |
Definition at line 58 of file neg_binomial_2_log_glm_lpmf.hpp.