OEKernelPLS

class OEKernelPLS

The OEKernelPLS can be used to build models using kernel partial least squares technique (kPLS).

To train a model using kPLS, the descriptors are expected to be in the dot-kernel space. Kernel partial least squares (PLS) has been particularly popular in chemometrics, due to its sub-cubic runtime for learning, and an iterative construction of directions which are relevant for predicting the outputs.

The OEKernelPLS class defines the following public methods:

Constructor

OEKernelPLS();
OEKernelPLS(const OEROCSQueryModelOptions& options);
OEKernelPLS(const OEKernelPLS&)

Default and copy constructors.

operator=

OEKernelPLS &operator=(const OEKernelPLS &)

Fit

bool Fit(const OESquareMatrix& kernel, const std::vector<double>& vecResponse,
         const unsigned maxFeatures);

Fit model using the provided kernel descriptor matrix.

kernel

kernel descriptor matrix.

vecResponse

vector of response corresponding to descriptors.

maxFeatures

Maximum number of PLS features to use for model fitting. A value of 0 (zero) corresponds to choosing number of features to fit the best model that minimizes error on the training set.

GetB0

double GetB0() const;

Get the fitted model intercept.

GetBValues

const std::vector<double>& GetBValues() const;

Get the fitted model regression coefficients.

GetNumFeaturesUsed

unsigned GetNumFeaturesUsed() const;

Returns the actual number of PLS features used for model fitting.

Predict

double Predict(const std::vector<double>& kernel) const;

Returns predicted estimation for the input descriptor vector.