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: Train classifier using partially labeled (annotated) image.
  
  Parameters
  ----------
  image : ndarray
      Input image, which can be grayscale or multichannel, and must have a
      number of dimensions compatible with ``self.features_func``.
  labels : ndarray of ints
      Labeled array of shape compatible with ``image`` (same shape for a
      single-channel image). Labels >= 1 correspond to the training set and
      label 0 to unlabeled pixels to be segmented.
docstr_tok: ["Train","classifier","using","partially","labeled","(","annotated",")","image",".","Parameters","--","--","--","--","--","image",":","ndarray","Input","image",",","which","can","be","grayscale","or","multichannel",",","and","must","have","a","number","of","dimensions","compatible","with","``","self.features_func","``",".","labels",":","ndarray","of","ints","Labeled","array","of","shape","compatible","with","``","image","``","(","same","shape","for","a","single-channel","image",")",".","Labels",">","=","1","correspond","to","the","training","set","and","label","0","to","unlabeled","pixels","to","be","segmented","."]
code: def fit(self, image, labels):
      """Train classifier using partially labeled (annotated) image.
  
      Parameters
      ----------
      image : ndarray
          Input image, which can be grayscale or multichannel, and must have a
          number of dimensions compatible with ``self.features_func``.
      labels : ndarray of ints
          Labeled array of shape compatible with ``image`` (same shape for a
          single-channel image). Labels >= 1 correspond to the training set and
          label 0 to unlabeled pixels to be segmented.
      """
      self.compute_features(image)
      fit_segmenter(labels, self.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 3 for calling the TrainableSegmenter obj's underlying member method code with example usage: obj.fit(image, labels) without return types