code: def __init__(
      self,
      logical_operator,
      coefficients,
      intercepts,
      device,
      classes=[0],
      multi_class=None,
      loss=None,
      is_linear_regression=False,
  ):
      super(LinearModel, self).__init__(logical_operator)
      self.coefficients = torch.nn.Parameter(
          torch.from_numpy(coefficients).detach().clone(),
          requires_grad=False,
      )
      self.intercepts = torch.nn.Parameter(
          torch.from_numpy(intercepts).view(-1).detach().clone(),
          requires_grad=False,
      )
      self.classes = torch.nn.Parameter(
          torch.IntTensor(classes), requires_grad=False
      )
      self.multi_class = multi_class
      self.regression = is_linear_regression
      self.classification = not is_linear_regression
      self.loss = loss
      if self.loss is None and self.classification:
          self.loss = "log"
  
      self.binary_classification = False
      if len(classes) == 2:
          self.binary_classification = True
  
imports: import torch
  from ._physical_operator import PhysicalOperator
label_desc: Use image node_id 1 to create a new LinearModel object from inherited base classes: PhysicalOperator, torch.nn with example: obj = LinearModel(logical_operator, coefficients, intercepts, device, classes, multi_class, loss, is_linear_regression)