input: 
  import numpy as np
  class LinearRegressionModel:
      """
      A neural network class in Python to model a linear regression function.
      Example:
      >>> model = LinearRegressionModel(3, 1)
      >>> x = np.array([[1, 2, 3]])
      >>> model.forward(x)
      array([[0.]])
      """
      def __init__(self, input_dim, output_dim):
          ''' Initialises the weights and bias of the linear regression model
          Arguments:
              input_dim {int} -- Number of input features
              output_dim {int} -- Number of outputs
          '''
          self.weights = np.zeros((input_dim, output_dim))
          self.bias = np.zeros((1, output_dim))
  
      def forward(self, x):
          ''' Calculates the forward pass of the linear regression model
          Arguments:
              x {numpy array} -- Input data of size (N, input_dim)
          Returns:
              out {numpy array} -- Output of the linear regression model of size (N, output_dim)
          '''
          out = np.dot(x, self.weights) + self.bias
          return out
  
output:     
      def train(self, x, y, learning_rate=0.01, num_epochs=1000):
          ''' Trains the linear regression model using gradient descent
          Arguments:
              x {numpy array} -- Input data of size (N, input_dim)
              y {numpy array} -- Target data of size (N, output_dim)
              learning_rate {float} -- Learning rate for gradient descent (default: 0.01)
              num_epochs {int} -- Number of epochs to train (default: 1000)
          '''
          for epoch in range(num_epochs):
              # Forward pass
              predictions = self.forward(x)
              
              # Compute loss (Mean Squared Error)
              loss = np.mean((predictions - y) ** 2)
              
              # Compute gradients
              d_weights = np.dot(x.T, (predictions - y)) / x.shape[0]
              d_bias = np.mean(predictions - y, axis=0)
              
              # Update weights and bias
              self.weights -= learning_rate * d_weights
              self.bias -= learning_rate * d_bias
              
              # Print loss every 100 epochs
              if epoch % 100 == 0:
                  print(f'Epoch {epoch}, Loss: {loss}')
  