gbnet.base ========== .. py:module:: gbnet.base Classes ------- .. autoapisummary:: gbnet.base.BaseGBModule Module Contents --------------- .. py:class:: BaseGBModule(min_hess=0.0) Bases: :py:obj:`torch.nn.Module`, :py:obj:`abc.ABC` Base class for gradient boosting modules. This abstract base class defines the common interface and functionality that all gradient boosting modules should implement. :ivar min_hess: minimum hessian value :vartype min_hess: float .. py:attribute:: min_hess :value: 0.0 .. py:attribute:: grad :value: None .. py:attribute:: hess :value: None .. py:method:: _input_checking_setting(input_data) :abstractmethod: Validate and prepare input data. :param input_data: Input data in model-specific format :returns: Processed input data ready for model .. py:method:: forward(input_data, return_tensor = True) :abstractmethod: Forward pass through the model. :param input_data: Input data in model-specific format :param return_tensor: Whether to return predictions as PyTorch tensor :returns: Model predictions as tensor or numpy array .. py:method:: _get_grad_hess_FX() .. py:method:: gb_step() :abstractmethod: Perform one gradient boosting step. This method should implement the logic for: 1. Getting gradients/hessians 2. Training one boosting iteration 3. Updating predictions