|
| double | loss (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) |
| | Calculates the loss for the multinomial loss function.
|
| |
| double | dual (const Eigen::MatrixXd &theta, const Eigen::MatrixXd &y, const Eigen::VectorXd &w) |
| | Calculates the dual for the multinomial loss function.
|
| |
| Eigen::MatrixXd | preprocessResponse (const Eigen::MatrixXd &y) |
| | Preprocesses the response for the Multinomial model.
|
| |
| Eigen::MatrixXd | hessianDiagonal (const Eigen::MatrixXd &eta) |
| | Calculates the hessian diagonal.
|
| |
| Eigen::MatrixXd | link (const Eigen::MatrixXd &mu) |
| | The link function.
|
| |
| Eigen::MatrixXd | inverseLink (const Eigen::MatrixXd &eta) |
| | The inverse link function.
|
| |
| Eigen::MatrixXd | predict (const Eigen::MatrixXd &eta) |
| | Return predicted response, which is an integer class label based 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 void | updateIntercept (Eigen::VectorXd &beta0, const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) |
| | Updates the intercept with a gradient descent update.
|
| |
| 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 Multinomial class represents a multinomial logistic regression loss function.
The multinomial loss function is used for multi-class classification problems. It calculates the loss, dual, residual, and updates weights and working response. It uses the non-redundant formulation of the loss with \( K - 1\) columns in the resulting response matrix.
Definition at line 21 of file multinomial.h.