class_docstr: Base class for decision trees.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
class_docstr_tok: ["Base","class","for","decision","trees",".","Warning",":","This","class","should","not","be","used","directly",".","Use","derived","classes","instead","."]
docstr: Compute the pruning path during Minimal Cost-Complexity Pruning.
  
  See :ref:`minimal_cost_complexity_pruning` for details on the pruning
  process.
  
  Parameters
  ----------
  X : {array-like, sparse matrix} of shape (n_samples, n_features)
      The training input samples. Internally, it will be converted to
      ``dtype=np.float32`` and if a sparse matrix is provided
      to a sparse ``csc_matrix``.
  
  y : array-like of shape (n_samples,) or (n_samples, n_outputs)
      The target values (class labels) as integers or strings.
  
  sample_weight : array-like of shape (n_samples,), default=None
      Sample weights. If None, then samples are equally weighted. Splits
      that would create child nodes with net zero or negative weight are
      ignored while searching for a split in each node. Splits are also
      ignored if they would result in any single class carrying a
      negative weight in either child node.
  
  Returns
  -------
  ccp_path : :class:`~sklearn.utils.Bunch`
      Dictionary-like object, with the following attributes.
  
      ccp_alphas : ndarray
          Effective alphas of subtree during pruning.
  
      impurities : ndarray
          Sum of the impurities of the subtree leaves for the
          corresponding alpha value in ``ccp_alphas``.
docstr_tok: ["Compute","the","pruning","path","during","Minimal","Cost-Complexity","Pruning",".","See",":","ref",":","`","minimal_cost_complexity_pruning","`","for","details","on","the","pruning","process",".","Parameters","--","--","--","--","--","X",":","{","array-like",",","sparse","matrix","}","of","shape","(","n_samples",",","n_features",")","The","training","input","samples",".","Internally",",","it","will","be","converted","to","``","dtype=np.float32","``","and","if","a","sparse","matrix","is","provided","to","a","sparse","``","csc_matrix","``",".","y",":","array-like","of","shape","(","n_samples",",",")","or","(","n_samples",",","n_outputs",")","The","target","values","(","class","labels",")","as","integers","or","strings",".","sample_weight",":","array-like","of","shape","(","n_samples",",",")",",","default=None","Sample","weights",".","If","None",",","then","samples","are","equally","weighted",".","Splits","that","would","create","child","nodes","with","net","zero","or","negative","weight","are","ignored","while","searching","for","a","split","in","each","node",".","Splits","are","also","ignored","if","they","would","result","in","any","single","class","carrying","a","negative","weight","in","either","child","node",".","Returns","--","--","--","-","ccp_path",":",":","class",":","`","~sklearn.utils.Bunch","`","Dictionary-like","object",",","with","the","following","attributes",".","ccp_alphas",":","ndarray","Effective","alphas","of","subtree","during","pruning",".","impurities",":","ndarray","Sum","of","the","impurities","of","the","subtree","leaves","for","the","corresponding","alpha","value","in","``","ccp_alphas","``","."]
code: def cost_complexity_pruning_path(self, X, y, sample_weight=None):
      """Compute the pruning path during Minimal Cost-Complexity Pruning.
  
      See :ref:`minimal_cost_complexity_pruning` for details on the pruning
      process.
  
      Parameters
      ----------
      X : {array-like, sparse matrix} of shape (n_samples, n_features)
          The training input samples. Internally, it will be converted to
          ``dtype=np.float32`` and if a sparse matrix is provided
          to a sparse ``csc_matrix``.
  
      y : array-like of shape (n_samples,) or (n_samples, n_outputs)
          The target values (class labels) as integers or strings.
  
      sample_weight : array-like of shape (n_samples,), default=None
          Sample weights. If None, then samples are equally weighted. Splits
          that would create child nodes with net zero or negative weight are
          ignored while searching for a split in each node. Splits are also
          ignored if they would result in any single class carrying a
          negative weight in either child node.
  
      Returns
      -------
      ccp_path : :class:`~sklearn.utils.Bunch`
          Dictionary-like object, with the following attributes.
  
          ccp_alphas : ndarray
              Effective alphas of subtree during pruning.
  
          impurities : ndarray
              Sum of the impurities of the subtree leaves for the
              corresponding alpha value in ``ccp_alphas``.
      """
      est = clone(self).set_params(ccp_alpha=0.0)
      est.fit(X, y, sample_weight=sample_weight)
      return Bunch(**ccp_pruning_path(est.tree_))
  
imports: from abc import ABCMeta
  from abc import abstractmethod
  from sklearn.base import MultiOutputMixin
  from sklearn.base import BaseEstimator
  from sklearn.base import is_classifier, clone
  from sklearn.utils import Bunch
  from sklearn.utils.validation import check_is_fitted
  import numpy
  from scipy.sparse import issparse
  from ._tree import Tree
  from ._tree import _build_pruned_tree_ccp
  from ._tree import ccp_pruning_path
  from .None import _tree, _splitter
label_desc: Use image node_id 10 for calling the BaseDecisionTree obj's underlying member method code with example usage: obj.cost_complexity_pruning_path(X, y, sample_weight) and returns: Bunch