class_docstr: Base class for MLP classification and regression.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
  
  .. versionadded:: 0.18
code: def _update_no_improvement_count(self, early_stopping, X_val, y_val):
      if early_stopping:
          # compute validation score, use that for stopping
          self.validation_scores_.append(self.score(X_val, y_val))
  
          if self.verbose:
              print(
                  "Validation score: %f" % self.validation_scores_[-1]
              )
          # update best parameters
          # use validation_scores_, not loss_curve_
          # let's hope no-one overloads .score with mse
          last_valid_score = self.validation_scores_[-1]
  
          if last_valid_score < (
              self.best_validation_score_ + self.tol
          ):
              self._no_improvement_count += 1
          else:
              self._no_improvement_count = 0
  
          if last_valid_score > self.best_validation_score_:
              self.best_validation_score_ = last_valid_score
              self._best_coefs = [c.copy() for c in self.coefs_]
              self._best_intercepts = [
                  i.copy() for i in self.intercepts_
              ]
      else:
          if self.loss_curve_[-1] > self.best_loss_ - self.tol:
              self._no_improvement_count += 1
          else:
              self._no_improvement_count = 0
          if self.loss_curve_[-1] < self.best_loss_:
              self.best_loss_ = self.loss_curve_[-1]
  
imports: import numpy
  from abc import ABCMeta, abstractmethod
  from scipy.optimize import fmin_l_bfgs_b
  import warnings
  from ..base import BaseEstimator, ClassifierMixin, RegressorMixin
  from ._base import ACTIVATIONS, DERIVATIVES, LOSS_FUNCTIONS
  from ._stochastic_optimizers import SGDOptimizer, AdamOptimizer
  from ..model_selection import train_test_split
  from ..externals import six
  from ..preprocessing import LabelBinarizer
  from ..utils import gen_batches, check_random_state
  from ..utils import shuffle
  from ..utils import check_array, check_X_y, column_or_1d
  from ..exceptions import ConvergenceWarning
  from ..utils.extmath import safe_sparse_dot
  from ..utils.validation import check_is_fitted
  from ..utils.multiclass import _check_partial_fit_first_call, unique_labels
  from ..utils.multiclass import type_of_target
label_desc: Use image node_id 13 for calling the BaseMultilayerPerceptron obj's underlying member method code with example usage: obj._update_no_improvement_count(early_stopping, X_val, y_val) without return types