class_docstr: Estimator for classifying pixels.
  
  Parameters
  ----------
  clf : classifier object, optional
      classifier object, exposing a ``fit`` and a ``predict`` method as in
      scikit-learn's API, for example an instance of
      ``RandomForestClassifier`` or ``LogisticRegression`` classifier.
  features_func : function, optional
      function computing features on all pixels of the image, to be passed
      to the classifier. The output should be of shape
      ``(m_features, *labels.shape)``. If None,
      :func:`skimage.feature.multiscale_basic_features` is used.
  
  Methods
  -------
  compute_features
  fit
  predict
docstr: Segment new image using trained internal classifier.
  
  Parameters
  ----------
  image : ndarray
      Input image, which can be grayscale or multichannel, and must have a
      number of dimensions compatible with ``self.features_func``.
  
  Raises
  ------
  NotFittedError if ``self.clf`` has not been fitted yet (use ``self.fit``).
docstr_tok: ["Segment","new","image","using","trained","internal","classifier",".","Parameters","--","--","--","--","--","image",":","ndarray","Input","image",",","which","can","be","grayscale","or","multichannel",",","and","must","have","a","number","of","dimensions","compatible","with","``","self.features_func","``",".","Raises","--","--","--","NotFittedError","if","``","self.clf","``","has","not","been","fitted","yet","(","use","``","self.fit","``",")","."]
code: def predict(self, image):
      """Segment new image using trained internal classifier.
  
      Parameters
      ----------
      image : ndarray
          Input image, which can be grayscale or multichannel, and must have a
          number of dimensions compatible with ``self.features_func``.
  
      Raises
      ------
      NotFittedError if ``self.clf`` has not been fitted yet (use ``self.fit``).
      """
      if self.features_func is None:
          self.features_func = multiscale_basic_features
      features = self.features_func(image)
      return predict_segmenter(features, self.clf)
  
file_path: scikit-image/skimage/future/trainable_segmentation.py
imports: from skimage.feature import multiscale_basic_features
label_desc: Use image node_id 4 for calling the TrainableSegmenter obj's underlying member method code with example usage: obj.predict(image) and returns: predict_segmenter