code: def predict(self, X):
          
          check_is_fitted(self, 'estimators_')
  
          if X.shape[1] != self.n_features_:
              raise ValueError('Dimensions of X are inconsistent with training data: '
                               'expected %d features, but got %s' % (self.n_features_, X.shape[1]))
  
          n_samples = X.shape[0]
          Xi = numpy.column_stack((numpy.ones(n_samples), X))
          pred = numpy.zeros(n_samples, dtype=float)
  
          for estimator in self.estimators_:
              pred += self.learning_rate * estimator.predict(Xi)
  
          if isinstance(self.loss_, (CensoredSquaredLoss, IPCWLeastSquaresError)):
              numpy.exp(pred, out=pred)
  
          return pred
docs: Predict risk scores.
  
          Parameters
          ----------
          X : array-like, shape = (n_samples, n_features)
              Data matrix.
  
          Returns
          -------
          risk_score : array, shape = (n_samples,)
              Predicted risk scores.