class_docstr: Base class for MLP classification and regression.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
  
  .. versionadded:: 0.18
class_docstr_tok: ["Base","class","for","MLP","classification","and","regression",".","Warning",":","This","class","should","not","be","used","directly",".","Use","derived","classes","instead",".","..","versionadded",":",":","0.18"]
docstr: Predict using the trained model
  
  Parameters
  ----------
  X : {array-like, sparse matrix}, shape (n_samples, n_features)
      The input data.
  
  Returns
  -------
  y_pred : array-like, shape (n_samples,) or (n_samples, n_outputs)
      The decision function of the samples for each class in the model.
code: def _predict(self, X):
      """Predict using the trained model
  
      Parameters
      ----------
      X : {array-like, sparse matrix}, shape (n_samples, n_features)
          The input data.
  
      Returns
      -------
      y_pred : array-like, shape (n_samples,) or (n_samples, n_outputs)
          The decision function of the samples for each class in the model.
      """
      X = check_array(X, accept_sparse=["csr", "csc", "coo"])
  
      # Make sure self.hidden_layer_sizes is a list
      hidden_layer_sizes = self.hidden_layer_sizes
      if not hasattr(hidden_layer_sizes, "__iter__"):
          hidden_layer_sizes = [hidden_layer_sizes]
      hidden_layer_sizes = list(hidden_layer_sizes)
  
      layer_units = (
          [X.shape[1]] + hidden_layer_sizes + [self.n_outputs_]
      )
  
      # Initialize layers
      activations = [X]
  
      for i in range(self.n_layers_ - 1):
          activations.append(np.empty((X.shape[0], layer_units[i + 1])))
      # forward propagate
      self._forward_pass(activations)
      y_pred = activations[-1]
  
      return y_pred
  
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 17 for calling the BaseMultilayerPerceptron obj's underlying member method code with example usage: obj._predict(X) and returns: y_pred