class_docstr: Container to identify training set.
  
  Samples a random subset from set passed to the `fit` method, to allow
  identification of the training set in a `transform` or `predict` method.
  
  Parameters
  ----------
  size : int
      size to sample. A random subset of size [size, size] will be stored
      in the instance.
docstr: Check if an array is the training set.
  
  Parameters
  ----------
  X: array-like
      training set to sample observations from.
  
  Returns
  ----------
  self: obj
      fitted instance with stored sample.
code: def is_train(self, X):
      """Check if an array is the training set.
  
      Parameters
      ----------
      X: array-like
          training set to sample observations from.
  
      Returns
      ----------
      self: obj
          fitted instance with stored sample.
      """
      if not hasattr(self, "train_shape"):
          raise NotFittedError(
              "This IdTrain instance is not fitted yet."
          )
  
      if not self._check_shape(X):
          return False
  
      idx = self.sample_idx_
  
      try:
          # Grab sample from `X`
          sample = X[ix_(idx[0], idx[1])]
  
          return array_equal(sample, self.sample_)
  
      except IndexError:
          # If index is out of bounds, X.shape < training_set.shape
          # -> X is not the training set
          return False
  
file_path: mlens/mlens/utils/id_train.py
imports: from __future__ import division, print_function
  from ..utils.exceptions import NotFittedError
  from ..externals.sklearn.base import BaseEstimator
  from numpy import array_equal, ix_
  from numpy.random import permutation
  from numbers import Integral
label_desc: Use image node_id 3 for calling the IdTrain obj's underlying member method code with example usage: obj.is_train(X) and returns: False, array_equal, False