class_docstr: Linear binary classifier.
  
  :param loss: the loss function to be optimized. `binomial` refers to
      deviance (= logistic regression) for classification
      with probabilistic outputs.
  :type loss: str, {'binomial', 'squared_hinge', 'smoothed_hinge'}, default='binomial'
  
  :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
  
  :param multiclass_mode: determines how to handle multi-class classification
  :type multiclass_mode: str, ['one_vs_all', 'one_vs_one'], default='one_vs_all'
class_docstr_tok: ["Linear","binary","classifier",".",":","param","loss",":","the","loss","function","to","be","optimized",".","`","binomial","`","refers","to","deviance","(","=","logistic","regression",")","for","classification","with","probabilistic","outputs",".",":","type","loss",":","str",",","{","'binomial","'",",","'squared_hinge","'",",","'smoothed_hinge","'","}",",","default='binomial'",":","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",":","param","multiclass_mode",":","determines","how","to","handle","multi-class","classification",":","type","multiclass_mode",":","str",",","[","'one_vs_all","'",",","'one_vs_one","'","]",",","default='one_vs_all","'"]
code: def __init__(
      self,
      loss="binomial",
      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,
      multiclass_mode="one_vs_all",
  ):
      if (
          loss != "binomial"
          and loss != "squared_hinge"
          and loss != "smoothed_hinge"
      ):
          raise ValueError(
              "The `loss` must be one of: `binomial`, `squared_hinge`, `smoothed_hinge`."
          )
      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.")
      if (
          multiclass_mode != "one_vs_all"
          and multiclass_mode != "one_vs_one"
      ):
          raise ValueError(
              "The `multiclass_mode` must be one of: `one_vs_all`, `one_vs_one`."
          )
  
      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),
          multiclass_mode,
      )
  
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 LinearClassifier object from inherited base classes: PythonWrapper with example: obj = LinearClassifier(loss, max_iteration_count, error_weight, sigmoid, tolerance, normalizeError, l1_reg, thread_count, multiclass_mode)