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``.
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: import copy
  import numbers
  import warnings
  from abc import ABCMeta, abstractmethod
  from math import ceil
  from numbers import Integral, Real
  import numpy
  from scipy.sparse import issparse
  from ..base import BaseEstimator, ClassifierMixin, MultiOutputMixin, RegressorMixin, _fit_context, clone, is_classifier
  from ..utils import Bunch, check_random_state, compute_sample_weight
  from ..utils._param_validation import Hidden, Interval, RealNotInt, StrOptions
  from ..utils.multiclass import check_classification_targets
  from ..utils.validation import _assert_all_finite_element_wise, _check_sample_weight, assert_all_finite, check_is_fitted
  from .None import _criterion, _splitter, _tree
  from ._criterion import Criterion
  from ._splitter import Splitter
  from ._tree import BestFirstTreeBuilder, DepthFirstTreeBuilder, Tree, _build_pruned_tree_ccp, ccp_pruning_path
  from ._utils import _any_isnan_axis0
label_desc: Use image node_id 12 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