code: def dropping_curve(
      estimator,
      X,
      y,
      feature_sizes=DEFAULT_FEATURE_SIZES,
      groups=None,
      ax=None,
      logx=False,
      cv=None,
      scoring=None,
      n_jobs=None,
      pre_dispatch="all",
      random_state=None,
      show=True,
      **kwargs,
  ) -> DroppingCurve:
      """
      Displays a random-feature dropping curve, comparing feature size to training
      and cross validation scores. The dropping curve aims to show how a model
      improves with more information.
  
      This helper function wraps the DroppingCurve class for one-off analysis.
  
      Parameters
      ----------
      estimator : a scikit-learn estimator
          An object that implements ``fit`` and ``predict``, can be a
          classifier, regressor, or clusterer so long as there is also a valid
          associated scoring metric.
  
          Note that the object is cloned for each validation.
  
      X : array-like, shape (n_samples, n_features)
          Input vector, where n_samples is the number of samples and
          n_features is the number of features.
  
      y : array-like, shape (n_samples) or (n_samples, n_features), optional
          Target relative to X for classification or regression;
          None for unsupervised learning.
  
      feature_sizes: array-like, shape (n_values,)
          default: ``np.linspace(0.1,1.0,5)``
  
          Relative or absolute numbers of input features that will be used to
          generate the learning curve. If the dtype is float, it is regarded as
          a fraction of the maximum number of features, otherwise it is
          interpreted as absolute numbers of features.
  
      groups : array-like, with shape (n_samples,)
          Optional group labels for the samples used while splitting the dataset
          into train/test sets.
  
      ax : matplotlib.Axes object, optional
          The axes object to plot the figure on.
  
      logx : boolean, optional
          If True, plots the x-axis with a logarithmic scale.
  
      cv : int, cross-validation generator or an iterable, optional
          Determines the cross-validation splitting strategy.
          Possible inputs for cv are:
  
            - None, to use the default 3-fold cross-validation,
            - integer, to specify the number of folds.
            - An object to be used as a cross-validation generator.
            - An iterable yielding train/test splits.
  
          see the scikit-learn
          `cross-validation guide <https://bit.ly/2MMQAI7>`_
          for more information on the possible strategies that can be used here.
  
      scoring : string, callable or None, optional, default: None
          A string or scorer callable object / function with signature
          ``scorer(estimator, X, y)``. See scikit-learn model evaluation
          documentation for names of possible metrics.
  
      n_jobs : integer, optional
          Number of jobs to run in parallel (default 1).
  
      pre_dispatch : integer or string, optional
          Number of predispatched jobs for parallel execution (default is
          all). The option can reduce the allocated memory. The string can
          be an expression like '2*n_jobs'.
  
      random_state : int, RandomState instance or None, optional (default=None)
          If int, random_state is the seed used by the random number generator;
          If RandomState instance, random_state is the random number generator;
          If None, the random number generator is the RandomState instance used
          by `np.random`. Used to generate feature subsets.
  
      kwargs : dict
          Keyword arguments that are passed to the base class and may influence
          the visualization as defined in other Visualizers.
  
      Returns
      -------
      dc : DroppingCurve
          Returns the fitted visualizer.
      """
      dc = DroppingCurve(
          estimator,
          feature_sizes=feature_sizes,
          groups=groups,
          ax=ax,
          logx=logx,
          cv=cv,
          scoring=scoring,
          n_jobs=n_jobs,
          pre_dispatch=pre_dispatch,
          random_state=random_state,
          **kwargs,
      )
  
      # Fit and show the visualizer
      dc.fit(X, y)
      if show:
          dc.show()
      else:
          dc.finalize()
      return dc
  
file_path: yellowbrick/yellowbrick/model_selection/dropping_curve.py
imports: import numpy
  from yellowbrick.base import ModelVisualizer
  from yellowbrick.style import resolve_colors
  from yellowbrick.exceptions import YellowbrickValueError
  from sklearn.model_selection import validation_curve
  from sklearn.pipeline import make_pipeline
  from sklearn.feature_selection import SelectKBest
label_desc: Use image node_id 1 for calling a global function with example usage: dropping_curve(estimator, X, y, feature_sizes, groups, ax, logx, cv, scoring, n_jobs, pre_dispatch, random_state, show) and returns: dc