def METHOD_NAME(input_data: np.ndarray, output_data: np.ndarray, bias: bool) \
        -> (np.ndarray, np.ndarray):
    """
    least square linear regression
    Given a matrix of input_data (X) and output_data (y), linear regression attempts to find solution vector (W)
    that will approximate y = W * X + b.
    :param input_data: input_data, in the shape of [n_samples, n_features]
    :param output_data: output_data, in the shape of [n_samples, n_targets]
    :param bias: whether to calculate the intercept for this model.
    :return: (new weight [n_samples, n_features], new bias [n_samples])
    """
    assert len(input_data.shape) == 2
    assert len(output_data.shape) == 2
    assert input_data.shape[0] == output_data.shape[0]
    # least squares Linear Regression
    # copy_X : If True, X (input_data) will be copied; else, it may be overwritten
    regressor = linear_model.LinearRegression(copy_X=True, fit_intercept=bias)
    regressor.fit(X=input_data, y=output_data)
    logger.info("finished linear regression fit ")
    # after regression, the coefficients attrib in the regressor form the new conv weights
    new_weight = regressor.coef_
    new_bias = regressor.intercept_ if bias is True else None
    return new_weight, new_bias