superviseddescent  0.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Member Functions | List of all members
superviseddescent::ColPivHouseholderQRSolver Class Reference

#include <regressors.hpp>

Public Member Functions

cv::Mat solve (cv::Mat data, cv::Mat labels, Regulariser regulariser)
 

Detailed Description

A solver that the LinearRegressor uses to solve its system of linear equations. It needs a solve function with the following signature: cv::Mat solve(cv::Mat data, cv::Mat labels, Regulariser regulariser)

The ColPivHouseholderQRSolver can check for invertibility, but it is much MUCH slower than a PartialPivLUSolver.

Member Function Documentation

cv::Mat superviseddescent::ColPivHouseholderQRSolver::solve ( cv::Mat  data,
cv::Mat  labels,
Regulariser  regulariser 
)
inline

Solves the linear system \( (\text{data}^t * \text{data} + \text{regulariser}) * X = \text{data}^t * \text{labels}\) where Regulariser is a diagonal matrix. This results in a least-squares approximation of the original system. labels can consist of multiple columns.

Note/Todo: we should leave the choice of inverting A or AtA to the solver. But this also means we need to pass through the regularisation params. We can't just pass a cv::Mat regularisation because the dimensions for regularising A and AtA are different.

Parameters
[in]dataData matrix with each row being a data sample.
[in]labelsLabels for each data sample.
[in]regulariserA regularisation.
Returns
The solution matrix.

The documentation for this class was generated from the following file: