code: def test_simple_linear_classification(self) -> None:
      xs = torch.tensor(
          [[0.5, 0.5], [-0.5, -0.5], [0.5, -0.5], [-0.5, 0.5]]
      )
      ys = torch.tensor([1.0, -1.0, 1.0, -1.0])
      self.train_and_compare(
          SGDLinearRegression,
          xs,
          ys,
          expected_loss=0,
          expected_reg=0,
          objective="ols",
      )
      self.train_and_compare(
          SGDLasso,
          xs,
          ys,
          expected_loss=1,
          expected_reg=0.0,
          objective="lasso",
      )
      self.train_and_compare(
          SGDRidge,
          xs,
          ys,
          expected_loss=1,
          expected_reg=0.0,
          objective="ridge",
      )
  
      ys = torch.tensor([1.0, 0.0, 1.0, 0.0])
      self.train_and_compare(
          SGDLinearRegression,
          xs,
          ys,
          expected_loss=0,
          expected_reg=0,
          objective="ols",
      )
      self.train_and_compare(
          SGDLasso,
          xs,
          ys,
          expected_loss=0.25,
          expected_reg=0,
          objective="lasso",
      )
      self.train_and_compare(
          SGDRidge,
          xs,
          ys,
          expected_loss=0.25,
          expected_reg=0,
          objective="ridge",
      )
  
file_path: captum/tests/utils/test_linear_model.py
imports: import torch
  from captum._utils.models.linear_model.model import SGDLasso, SGDLinearRegression, SGDRidge
  from tests.helpers.basic import assertTensorAlmostEqual, BaseTest
label_desc: Use image node_id 4 for calling the TestLinearModel obj's underlying member method code with example usage: obj.test_simple_linear_classification() without return types