stackboost/core.py
def __inner_predict(self, X: np.ndarray, iteration: int) -> np.ndarray:
        """
        Inner method used to make prediction of n trees

        :param X: prediction dataset
        :param iteration: number of trees to predict
        :return: predictions array
        """
        y_pred = np.full(np.shape(X)[0], self.initial_prediction).reshape(-1, 1) if self.regression else None

        # Make predictions
        for tree in self.trees[:iteration + 1]:
            # Estimate gradient and update prediction
            update_pred = tree.predict(X)
            if y_pred is None:
                y_pred = np.zeros_like(update_pred)
            y_pred -= np.multiply(self.learning_rate, update_pred)

        return y_pred

        Inner method used to make prediction of n trees

        :param X: prediction dataset
        :param iteration: number of trees to predict
        :return: predictions array
        
Inner method used to make prediction of n trees
Inner method used to make prediction of n trees
def __inner_predict(self, X: np.ndarray, iteration: int) -> np.ndarray:
        y_pred = np.full(np.shape(X)[0], self.initial_prediction).reshape(-1, 1) if self.regression else None
        for tree in self.trees[:iteration + 1]:
            update_pred = tree.predict(X)
            if y_pred is None:
                y_pred = np.zeros_like(update_pred)
            y_pred -= np.multiply(self.learning_rate, update_pred)
        return y_pred
def __inner_predict ( self , X : np . ndarray , iteration : int ) -> np . ndarray : y_pred = np . full ( np . shape ( X ) [ 0 ] , self . initial_prediction ) . reshape ( - 1 , 1 ) if self . regression else None for tree in self . trees [ : iteration + 1 ] : update_pred = tree . predict ( X ) if y_pred is None : y_pred = np . zeros_like ( update_pred ) y_pred -= np . multiply ( self . learning_rate , update_pred ) return y_pred
Inner method used to make prediction of n trees
Inner method used to make prediction of n trees
"""
        Inner method used to make prediction of n trees

        :param X: prediction dataset
        :param iteration: number of trees to predict
        :return: predictions array
        """ # Make predictions # Estimate gradient and update prediction
None
self
X
np.ndarray
None
iteration
int
number of trees to predict
number of trees to predict