#include <regressors.hpp>
|
virtual bool | learn (cv::Mat data, cv::Mat labels)=0 |
|
virtual double | test (cv::Mat data, cv::Mat labels)=0 |
|
virtual cv::Mat | predict (cv::Mat values)=0 |
|
Abstract base class for regressor-like learning algorithms to be used with the SupervisedDescentOptimiser.
Classes that implement this minimal set of functions can be used with the SupervisedDescentOptimiser.
virtual bool superviseddescent::Regressor::learn |
( |
cv::Mat |
data, |
|
|
cv::Mat |
labels |
|
) |
| |
|
pure virtual |
Learning function that takes a matrix of data, with one example per row, and a corresponding matrix of labels, with one or multiple labels per training datum.
- Parameters
-
[in] | data | Training data matrix, one example per row. |
[in] | labels | Labels corresponding to the training data. |
- Returns
- Returns whether the learning was successful.
Implemented in superviseddescent::LinearRegressor< Solver >.
virtual cv::Mat superviseddescent::Regressor::predict |
( |
cv::Mat |
values | ) |
|
|
pure virtual |
virtual double superviseddescent::Regressor::test |
( |
cv::Mat |
data, |
|
|
cv::Mat |
labels |
|
) |
| |
|
pure virtual |
Test the learned regressor, using the given data (one row for every element) and corresponding labels. Calculates the normalised least squares residual \( \frac{\|\mathbf{prediction}-\mathbf{labels}\|}{\|\mathbf{labels}\|} \).
- Parameters
-
[in] | data | Test data matrix. |
[in] | labels | Corresponding label information. |
- Returns
- The normalised least squares residual.
Implemented in superviseddescent::LinearRegressor< Solver >.
The documentation for this class was generated from the following file: