|
| double | loss (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) override |
| | Calculates the negative log-likelihood loss for the Poisson regression.
|
| |
| double | dual (const Eigen::MatrixXd &theta, const Eigen::MatrixXd &y, const Eigen::VectorXd &w) override |
| | Calculates the Fenchel conjugate (dual) of the Poisson loss.
|
| |
| Eigen::MatrixXd | hessianDiagonal (const Eigen::MatrixXd &eta) override |
| | Calculates hessian diagonal.
|
| |
| Eigen::MatrixXd | preprocessResponse (const Eigen::MatrixXd &y) override |
| | Preprocesses the response for the Poisson model.
|
| |
| void | updateIntercept (Eigen::VectorXd &beta0, const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) override |
| | Updates the intercept with a gradient descent update. Unlike the Quadratic and Logistic cases, the Poisson regression intercept update is not quite as simple since the gradient is not Lipschitz continuous. Instead we use a backtracking line search here.
|
| |
| Eigen::MatrixXd | link (const Eigen::MatrixXd &mu) override |
| | The link function.
|
| |
| Eigen::MatrixXd | inverseLink (const Eigen::MatrixXd &eta) override |
| | The inverse link function, also known as the mean function.
|
| |
| Eigen::MatrixXd | predict (const Eigen::MatrixXd &eta) override |
| | Return predicted response, that is 0 or 1 depending on the predicted probabilities.
|
| |
|
virtual | ~Loss ()=default |
| | Destructor for the Loss class.
|
| |
| Eigen::MatrixXd | residual (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) |
| | Calculates the generalized residual.
|
| |
| virtual void | updateWeightsAndWorkingResponse (Eigen::MatrixXd &w, Eigen::MatrixXd &z, const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) |
| | Updates weights and working response.
|
| |
| virtual double | deviance (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) |
| | Computes deviance, which is 2 times the difference between the loglikelihood of the model and the loglikelihood of the null (intercept-only) model.
|
| |
The Poisson class represents a Poisson regression loss function.
The Poisson regression loss function is used for modeling count data. It assumes the response variable follows a Poisson distribution. The log-likelihood for a single observation is:
\[ \ell(y_i|\eta_i) = y_i\eta_i - e^{\eta_i} - \log(y_i!) \]
where \(\eta_i\) is the linear predictor and \(y_i\) is the observed count.
Definition at line 24 of file poisson.h.