def __init__(self, method='normal_equation', normalize=False, lr=0.01, epochs=1000, add_intercept=False):
    assert (method in ['normal_equation', 'gradient_descent']), "Method not supported. Supported methods are 'normal_equation' and 'gradient_descent'"
    self.method = method
    self.normalize = normalize
    self.add_intercept = add_intercept
    self._weights = None
    if (self.method == 'gradient_descent'):
        self.lr = lr
        self.epochs = epochs
    if self.normalize:
        self._feature_scaler = MinMaxScaler()
        self._target_scaler = MinMaxScaler()
def __init__(self, method='normal_equation', normalize=False, lr=0.01, epochs=1000, add_intercept=False):
    assert (method in ['normal_equation', 'gradient_descent']), "Method not supported. Supported methods are 'normal_equation' and 'gradient_descent'"
    self.method = method
    self.normalize = normalize
    self.add_intercept = add_intercept
    self._weights = None
    if (self.method == 'gradient_descent'):
        self.lr = lr
        self.epochs = epochs
    if self.normalize:
        self._feature_scaler = MinMaxScaler()
        self._target_scaler = MinMaxScaler()