IIRLRegression

class menpofit.math.IIRLRegression(alpha=0, bias=False, alpha2=0)[source]

Bases: IRLRegression

Class for training and applying Indirect Incremental Regularized Linear Regression.

Parameters:
  • alpha (float, optional) – The regularization parameter.
  • bias (bool, optional) – If True, a bias term is used.
  • alpha2 (float, optional) – The regularization parameter of the Hessian.
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.