uf3.regression.least_squares.freeze_columns

freeze_columns(x: numpy.ndarray, y: numpy.ndarray, mask: numpy.ndarray, frozen_c: numpy.ndarray, col_idx: numpy.ndarray) Tuple[numpy.ndarray, numpy.ndarray][source]

Freeze coefficients of the solution (e.g. forcing to zero) by simultaneously eliminating columns of the input and their assumed contribution to the output.

Parameters
  • x (np.ndarray) – input matrix.

  • y (np.ndarray) – output vector.

  • mask (np.ndarray) – set of non-frozen indices.

  • frozen_c (np.ndarray) – values of coefficients to be frozen.

  • col_idx (np.ndarray) – indices of coefficients to be frozen.

Returns

input matrix without frozen columns. y (np.ndarray): output vector, minus frozen contributions.

Return type

x (np.ndarray)