uf3.regression.least_squares.moore_penrose_components

moore_penrose_components(x, y)[source]

Compute gram matrix (x^T x) and ordinate (x^T y).

Parameters
  • x (np.ndarray) – input matrix of shape (n_samples, n_features).

  • y (np.ndarray) – output vector of length n_samples.

Returns

Gram matrix (X’X) b: ordinate (X’y)

Return type

a