original_docstring: 
      Trains linear regression, classifies test data, computes test error on test set
  
      Returns:
          Final test error
      
docstring: Trains linear regression, classifies test data, computes test error on test set
docstring_tokens: Trains linear regression classifies test data computes test error on test set
code: def run_linear_regression_on_MNIST(lambda_factor=1):
      """
      Trains linear regression, classifies test data, computes test error on test set
  
      Returns:
          Final test error
      """
      train_x, train_y, test_x, test_y = get_MNIST_data()
      train_x_bias = np.hstack([np.ones([train_x.shape[0], 1]), train_x])
      test_x_bias = np.hstack([np.ones([test_x.shape[0], 1]), test_x])
      theta = closed_form(train_x_bias, train_y, lambda_factor)
      test_error = compute_test_error_linear(test_x_bias, test_y, theta)
      return test_error
code_tokens: def run_linear_regression_on_MNIST ( lambda_factor = 1 ) : train_x , train_y , test_x , test_y = get_MNIST_data ( ) train_x_bias = np . hstack ( [ np . ones ( [ train_x . shape [ 0 ] , 1 ] ) , train_x ] ) test_x_bias = np . hstack ( [ np . ones ( [ test_x . shape [ 0 ] , 1 ] ) , test_x ] ) theta = closed_form ( train_x_bias , train_y , lambda_factor ) test_error = compute_test_error_linear ( test_x_bias , test_y , theta ) return test_error
short_docstring: Trains linear regression, classifies test data, computes test error on test set
short_docstring_tokens: Trains linear regression classifies test data computes test error on test set
comment: """
      Trains linear regression, classifies test data, computes test error on test set
  
      Returns:
          Final test error
      """