OPPRegression

class menpofit.math.OPPRegression(bias=True, whiten=False)[source]

Bases: object

Class for training and applying Multivariate Linear Regression using Orthogonal Procrustes Problem reconstructions.

Parameters
  • bias (bool, optional) – If True, a bias term is used.

  • whiten (bool, optional) – Whether to use a whitened PCA model.

increment(X, Y)[source]

Incrementally update the regression model.

Parameters
  • X ((n_features, n_samples) ndarray) – The array of feature vectors.

  • Y ((n_dims, n_samples) ndarray) – The array of target vectors.

Raises

ValueError – Model is not incrementable

predict(x)[source]

Makes a prediction using the trained regression model.

Parameters

x ((n_features,) ndarray) – The input feature vector.

Returns

prediction ((n_dims,) ndarray) – The prediction vector.

train(X, Y)[source]

Train the regression model.

Parameters
  • X ((n_features, n_samples) ndarray) – The array of feature vectors.

  • Y ((n_dims, n_samples) ndarray) – The array of target vectors.