def METHOD_NAME(self, X, y=None, **kwargs):
    logger.debug('Regress out confounder.')
    sample_ols_confounder = self._check_for_confounders(kwargs)
    self._validate_dimension(X, sample_ols_confounder)
    # standardize covariates
    if self.standardize_covariates:
        sample_ols_confounder = self._standardize(sample_ols_confounder, is_fit=False)
    sample_ols_confounder = sm.add_constant(sample_ols_confounder, has_constant="add")
    X_new = np.empty(X.shape)
    for i in range(X.shape[1]):
        preds = np.matmul(sample_ols_confounder, np.squeeze(self.olsModel_params[i]))
        residuum_feature_vector = np.squeeze(X[:, i]) - preds
        # residuum_feature_vector += self.olsModel_params[i, 0]  # add intercept
        X_new[:, i] = np.asarray(residuum_feature_vector)  # writing back the residuum of the feature vector
    return X_new, kwargs