class_docstr: Gradient boosting for classification. Gradient boosting method creates an ensemble of decision trees
  using random subsets of features and input data.
  
  :param loss: the loss function to be optimized. 
      'binomial' refers to deviance (= logistic regression) for classification
      with probabilistic outputs. 
      'exponential' is similar to the AdaBoost algorithm.
  :type loss: str, {'exponential', 'binomial', 'squared_hinge', 'l2'}, default='binomial'
  
  :param iteration_count: the maximum number of iterations (that is, the number of trees in the ensemble).
  :type iteration_count: int, default=100
  
  :param learning_rate: the multiplier for each classifier tree.
      There is a trade-off between ``learning_rate`` and ``iteration_count``.
  :type learning_rate: float, default=0.1
  
  :param subsample: the fraction of input data that is used for building one tree.
  :type subsample: float, [0..1], default=1.0
  
  :param subfeature: the fraction of features that is used for building one tree.
  :type subfeature: float, [0..1], default=1.0
  
  :param random_seed: the random generator seed number.
  :type random_seed: int, default=0
  
  :param max_depth: the maximum depth of a tree in ensemble.
  :type max_depth: int, default=10
  
  :param max_node_count: the maximum number of nodes in a tree. -1 means no limitation.
  :type max_node_count: int, default=-1
  
  :param l1_reg: the L1 regularization factor.
  :type l1_reg: float, default=0.0
  
  :param l2_reg: the L2 regularization factor.
  :type l2_reg: float, default=1.0
  
  :param prune: the value of criterion difference when the nodes should be merged.
      The 0 default value means never merge nodes.
  :type prune: float, default=0.0
  
  :param thread_count: the number of processing threads to be used while training the model.
  :type thread_count: int, default=1
  
  :param builder_type: the type of tree builder used. 
      ``full`` means all feature values are used for splitting nodes.
      ``hist`` means the steps of a histogram created from feature values
      ``multi_full`` means 'full' with multiclass trees
      will be used for splitting nodes.
  :type builder_type: str, {'full', 'hist', 'multi_full'}, default='full'
  
  :param max_bins: the largest possible histogram size to be used in ``hist`` mode.
  :type max_bins: int, default=32
  
  :param min_subtree_weight: the minimum subtree weight. The 0 default value means no lower limit.
  :type min_subtree_weight: float, default=0.0
class_docstr_tok: ["Gradient","boosting","for","classification",".","Gradient","boosting","method","creates","an","ensemble","of","decision","trees","using","random","subsets","of","features","and","input","data",".",":","param","loss",":","the","loss","function","to","be","optimized",".","'binomial","'","refers","to","deviance","(","=","logistic","regression",")","for","classification","with","probabilistic","outputs",".","'exponential","'","is","similar","to","the","AdaBoost","algorithm",".",":","type","loss",":","str",",","{","'exponential","'",",","'binomial","'",",","'squared_hinge","'",",","'l2","'","}",",","default='binomial'",":","param","iteration_count",":","the","maximum","number","of","iterations","(","that","is",",","the","number","of","trees","in","the","ensemble",")",".",":","type","iteration_count",":","int",",","default=100",":","param","learning_rate",":","the","multiplier","for","each","classifier","tree",".","There","is","a","trade-off","between","``","learning_rate","``","and","``","iteration_count","``",".",":","type","learning_rate",":","float",",","default=0.1",":","param","subsample",":","the","fraction","of","input","data","that","is","used","for","building","one","tree",".",":","type","subsample",":","float",",","[","0","..","1","]",",","default=1.0",":","param","subfeature",":","the","fraction","of","features","that","is","used","for","building","one","tree",".",":","type","subfeature",":","float",",","[","0","..","1","]",",","default=1.0",":","param","random_seed",":","the","random","generator","seed","number",".",":","type","random_seed",":","int",",","default=0",":","param","max_depth",":","the","maximum","depth","of","a","tree","in","ensemble",".",":","type","max_depth",":","int",",","default=10",":","param","max_node_count",":","the","maximum","number","of","nodes","in","a","tree",".","-1","means","no","limitation",".",":","type","max_node_count",":","int",",","default=-1",":","param","l1_reg",":","the","L1","regularization","factor",".",":","type","l1_reg",":","float",",","default=0.0",":","param","l2_reg",":","the","L2","regularization","factor",".",":","type","l2_reg",":","float",",","default=1.0",":","param","prune",":","the","value","of","criterion","difference","when","the","nodes","should","be","merged",".","The","0","default","value","means","never","merge","nodes",".",":","type","prune",":","float",",","default=0.0",":","param","thread_count",":","the","number","of","processing","threads","to","be","used","while","training","the","model",".",":","type","thread_count",":","int",",","default=1",":","param","builder_type",":","the","type","of","tree","builder","used",".","``","full","``","means","all","feature","values","are","used","for","splitting","nodes",".","``","hist","``","means","the","steps","of","a","histogram","created","from","feature","values","``","multi_full","``","means","'full","'","with","multiclass","trees","will","be","used","for","splitting","nodes",".",":","type","builder_type",":","str",",","{","'full","'",",","'hist","'",",","'multi_full","'","}",",","default='full'",":","param","max_bins",":","the","largest","possible","histogram","size","to","be","used","in","``","hist","``","mode",".",":","type","max_bins",":","int",",","default=32",":","param","min_subtree_weight",":","the","minimum","subtree","weight",".","The","0","default","value","means","no","lower","limit",".",":","type","min_subtree_weight",":","float",",","default=0.0"]
code: def __init__(
      self,
      loss="binomial",
      iteration_count=100,
      learning_rate=0.1,
      subsample=1.0,
      subfeature=1.0,
      random_seed=0,
      max_depth=10,
      max_node_count=-1,
      l1_reg=0.0,
      l2_reg=1.0,
      prune=0.0,
      thread_count=1,
      builder_type="full",
      max_bins=32,
      min_subtree_weight=0.0,
  ):
      if (
          loss != "binomial"
          and loss != "exponential"
          and loss != "squared_hinge"
          and loss != "l2"
      ):
          raise ValueError(
              "The `loss` must be one of: `exponential`, `binomial`, `squared_hinge`, `l2`."
          )
      if builder_type not in (
          "full",
          "hist",
          "multi_full",
          "multi_hist",
      ):
          raise ValueError(
              "The `builder_type` must be one of: `full`, `hist`, `multi_full`, `multi_hist`."
          )
      if iteration_count <= 0:
          raise ValueError("The `iteration_count` must be > 0.")
      if subsample < 0 or subsample > 1:
          raise ValueError("The `subsample` must be in [0..1].")
      if subfeature < 0 or subfeature > 1:
          raise ValueError("The `subfeature` must be in [0..1].")
      if max_depth < 0:
          raise ValueError("The `max_depth` must be >= 0.")
      if max_node_count < 0 and max_node_count != -1:
          raise ValueError(
              "The `max_node_count` must be >= 0 or equal to -1."
          )
      if prune < 0:
          raise ValueError("The `prune` must be >= 0.")
      if thread_count <= 0:
          raise ValueError("The `thread_count` must be > 0.")
      if min_subtree_weight < 0:
          raise ValueError("The `min_subtree_weight` must be >= 0.")
  
      super().__init__(
          loss,
          int(iteration_count),
          float(learning_rate),
          float(subsample),
          float(subfeature),
          int(random_seed),
          int(max_depth),
          int(max_node_count),
          float(l1_reg),
          float(l2_reg),
          float(prune),
          int(thread_count),
          builder_type,
          int(max_bins),
          float(min_subtree_weight),
      )
  
file_path: neoml/NeoML/Python/neoml/GradientBoost.py
imports: import numpy
  from .Utils import convert_data, get_data
  import neoml.PythonWrapper
label_desc: Use image node_id 1 to create a new GradientBoostClassifier object from inherited base classes: PythonWrapper with example: obj = GradientBoostClassifier(loss, iteration_count, learning_rate, subsample, subfeature, random_seed, max_depth, max_node_count, l1_reg, l2_reg, prune, thread_count, builder_type, max_bins, min_subtree_weight)