class_docstr: Class implementing the Perfect Tree Traversal strategy in PyTorch.
docstr: Args:
      tree_parameters: The parameters defining the tree structure
      max_depth: The maximum tree-depth in the model
      n_features: The number of features input to the model
      classes: The classes used for classification. None if implementing a regression model
      extra_config: Extra configuration used to properly implement the source tree
docstr_tok: ["Args",":","tree_parameters",":","The","parameters","defining","the","tree","structure","max_depth",":","The","maximum","tree-depth","in","the","model","n_features",":","The","number","of","features","input","to","the","model","classes",":","The","classes","used","for","classification",".","None","if","implementing","a","regression","model","extra_config",":","Extra","configuration","used","to","properly","implement","the","source","tree"]
code: def __init__(
      self,
      logical_operator,
      tree_parameters,
      max_depth,
      n_features,
      classes=None,
      extra_config={},
      **kwargs,
  ):
      """
      Args:
          tree_parameters: The parameters defining the tree structure
          max_depth: The maximum tree-depth in the model
          n_features: The number of features input to the model
          classes: The classes used for classification. None if implementing a regression model
          extra_config: Extra configuration used to properly implement the source tree
      """
      super(PerfectTreeTraversalGBDTImpl, self).__init__(
          logical_operator,
          tree_parameters,
          max_depth,
          n_features,
          classes,
          1,
          extra_config,
          **kwargs,
      )
  
      self.n_gbdt_classes = 1
      self.post_transform = _tree_commons.PostTransform()
  
      if constants.POST_TRANSFORM in extra_config:
          self.post_transform = extra_config[constants.POST_TRANSFORM]
  
      if classes is not None:
          self.n_gbdt_classes = len(classes) if len(classes) > 2 else 1
  
      self.n_trees_per_class = (
          len(tree_parameters) // self.n_gbdt_classes
      )
  
imports: from abc import abstractmethod
  from enum import Enum
  import numpy
  import torch
  from .None import constants
  from ._physical_operator import PhysicalOperator
  from .None import _tree_commons
label_desc: Use image node_id 1 to create a new PerfectTreeTraversalGBDTImpl object from inherited base classes: PerfectTreeTraversalTreeImpl with example: obj = PerfectTreeTraversalGBDTImpl(logical_operator, tree_parameters, max_depth, n_features, classes, extra_config)