|
| double | loss (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) override |
| | Calculates the loss for the multinomial loss function.
|
| double | loss (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, const Eigen::VectorXd &observation_weights) override |
| | Calculates the loss averaged by observation weights.
|
| double | dual (const Eigen::MatrixXd &theta, const Eigen::MatrixXd &y, const Eigen::VectorXd &w) override |
| | Calculates the dual for the multinomial loss function.
|
| Eigen::MatrixXd | dualPoint (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, bool fit_intercept) override |
| | Constructs a dual candidate from a linear predictor.
|
| Eigen::MatrixXd | dualPoint (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, bool fit_intercept, const Eigen::VectorXd &observation_weights) override |
| | Constructs a dual candidate with weighted intercept stationarity.
|
| Eigen::MatrixXd | preprocessResponse (const Eigen::MatrixXd &y) override |
| | Preprocesses the response for the Multinomial model.
|
| Eigen::MatrixXd | hessianDiagonal (const Eigen::MatrixXd &eta) override |
| | Calculates the hessian diagonal.
|
| Eigen::MatrixXd | link (const Eigen::MatrixXd &mu) override |
| | The link function.
|
| Eigen::MatrixXd | inverseLink (const Eigen::MatrixXd &eta) override |
| | The inverse link function.
|
| Eigen::MatrixXd | predict (const Eigen::MatrixXd &eta) override |
| | 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 | updateWeightsAndWorkingResponse (Eigen::MatrixXd &w, Eigen::MatrixXd &z, const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, const Eigen::VectorXd &observation_weights) |
| | Updates the IRLS approximation including observation weights.
|
| 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.
|
|
virtual double | deviance (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, const Eigen::VectorXd &observation_weights) |
| | Computes deviance averaged by observation weights.
|
|
|
Eigen::MatrixXd | residualOnSupport (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, const Eigen::VectorXd &observation_weights) |
| | Evaluates family residuals only on positive-weight observations.
|
| | Loss (double lipschitz_constant) |
| | Constructs an loss function with specified Lipschitz constant.
|
| Eigen::MatrixXd | domainSafePoint (const Eigen::MatrixXd &mean, const Eigen::MatrixXd &y, double lower, double upper) const |
| | Enforces scalar intercept stationarity without leaving a mean domain.
|
|
Eigen::MatrixXd | domainSafePoint (const Eigen::MatrixXd &mean, const Eigen::MatrixXd &y, double lower, double upper, const Eigen::VectorXd &observation_weights) const |
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.