|
| double | loss (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) override |
| | Calculates the quadratic (least-squares) loss.
|
| 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 |
| | Computes the dual function for the quadratic 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 quadratic model.
|
| void | updateWeightsAndWorkingResponse (Eigen::MatrixXd &w, Eigen::MatrixXd &z, const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) override |
| | Updates weights and working response for IRLS algorithm.
|
| Eigen::MatrixXd | link (const Eigen::MatrixXd &mu) override |
| | The link function.
|
| Eigen::MatrixXd | inverseLink (const Eigen::MatrixXd &eta) override |
| | The link function, also known as the mean function.
|
| Eigen::MatrixXd | predict (const Eigen::MatrixXd &eta) override |
| | Return predicted response, which is the same as the linear predictor.
|
| 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 | ~Loss ()=default |
| | Destructor for the Loss class.
|
| Eigen::MatrixXd | residual (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y) |
| | Calculates the generalized residual.
|
| virtual Eigen::MatrixXd | dualPoint (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, bool fit_intercept) |
| | Constructs a dual candidate from a linear predictor.
|
| virtual Eigen::MatrixXd | dualPoint (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, bool fit_intercept, const Eigen::VectorXd &observation_weights) |
| | Constructs a dual candidate with weighted intercept stationarity.
|
| 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 |
Implementation of the Quadratic loss function.
The Quadratic class provides methods for computing loss, dual function, residuals, and weight updates for the Quadratic case in the SLOPE algorithm. It is particularly suited for regression problems where the error terms are assumed to follow a normal distribution.
- Note
- This class inherits from the base Loss class and implements all required virtual functions.
Definition at line 27 of file quadratic.h.