'Predict class at each stage for X.
This method allows monitoring (i.e. determine error on testing set)
after each stage.
Parameters
X : array-like or sparse matrix, shape = [n_samples, n_features]
The input samples. Internally, it will be converted to
``dtype=np.float32`` and if a sparse matrix is provided
to a sparse ``csr_matrix``.
Returns
y : generator of array of shape = [n_samples]
The predicted value of the input samples.'

def staged_predict(self, X):

    for score in self._staged_decision_function(X):
        decisions = self.loss_._score_to_decision(score)
        (yield self.classes_.take(decisions, axis=0))
