class_docstr: Linear regressor.
  
  :param loss: the loss function to be optimized. 
      The quadratic loss L2 is the only one supported.
  :type loss: str, {'l2'}, default='l2'
  
  :param max_iteration_count: the maximum number of iterations.
  :type max_iteration_count: int, default=1000
  
  :param error_weight: the error weight relative to the regularization coefficient.
  :type error_weight: float, default=1.0
  
  :param sigmoid: the predefined sigmoid function coefficients.
  :type sigmoid: array of 2 float, default=(0.0, 0.0)
  
  :param tolerance: the stop criterion.
      -1 means calculate stop criterion automatically, 
      from the amount of vectors in each class in the training sample.
  :type tolerance: float, default=-1.0
  
  :param normalizeError: specifies if the error should be normalized.
  :type normalizeError: bool, default=False
  
  :param l1_reg: the L1 regularization coefficient.
      If 0, L2 regularization will be used instead.
  :type l1_reg: float, default=0.0
  
  :param thread_count: the number of threads to be used while training the model.
  :type thread_count: int, default=1
class_docstr_tok: ["Linear","regressor",".",":","param","loss",":","the","loss","function","to","be","optimized",".","The","quadratic","loss","L2","is","the","only","one","supported",".",":","type","loss",":","str",",","{","'l2","'","}",",","default='l2'",":","param","max_iteration_count",":","the","maximum","number","of","iterations",".",":","type","max_iteration_count",":","int",",","default=1000",":","param","error_weight",":","the","error","weight","relative","to","the","regularization","coefficient",".",":","type","error_weight",":","float",",","default=1.0",":","param","sigmoid",":","the","predefined","sigmoid","function","coefficients",".",":","type","sigmoid",":","array","of","2","float",",","default=","(","0.0",",","0.0",")",":","param","tolerance",":","the","stop","criterion",".","-1","means","calculate","stop","criterion","automatically",",","from","the","amount","of","vectors","in","each","class","in","the","training","sample",".",":","type","tolerance",":","float",",","default=-1.0",":","param","normalizeError",":","specifies","if","the","error","should","be","normalized",".",":","type","normalizeError",":","bool",",","default=False",":","param","l1_reg",":","the","L1","regularization","coefficient",".","If","0",",","L2","regularization","will","be","used","instead",".",":","type","l1_reg",":","float",",","default=0.0",":","param","thread_count",":","the","number","of","threads","to","be","used","while","training","the","model",".",":","type","thread_count",":","int",",","default=1"]
code: def __init__(
      self,
      loss="l2",
      max_iteration_count=1000,
      error_weight=1.0,
      sigmoid=(0.0, 0.0),
      tolerance=-1.0,
      normalizeError=False,
      l1_reg=0.0,
      thread_count=1,
  ):
      if loss != "l2":
          raise ValueError("The `loss` must be `l2` for regression.")
      if max_iteration_count <= 0:
          raise ValueError("The `max_iteration_count` must be > 0.")
      if error_weight <= 0:
          raise ValueError("The `error_weight` must be >= 0.")
  
      if thread_count <= 0:
          raise ValueError("The `thread_count` must be > 0.")
  
      super().__init__(
          loss,
          int(max_iteration_count),
          float(error_weight),
          float(sigmoid[0]),
          float(sigmoid[1]),
          float(tolerance),
          bool(normalizeError),
          float(l1_reg),
          int(thread_count),
          "",
      )
  
file_path: neoml/NeoML/Python/neoml/Linear.py
imports: import numpy
  from .Utils import convert_data, get_data
  from scipy.sparse import csr_matrix, issparse
  import neoml.PythonWrapper
label_desc: Use image node_id 1 to create a new LinearRegressor object from inherited base classes: PythonWrapper with example: obj = LinearRegressor(loss, max_iteration_count, error_weight, sigmoid, tolerance, normalizeError, l1_reg, thread_count)