<h4 dir="auto">Describe the issue linked to the documentation</h4>
<p dir="auto"><a href="https://scikit-learn.org/stable/developers/contributing.html#guidelines-for-writing-documentation" rel="nofollow">https://scikit-learn.org/stable/developers/contributing.html#guidelines-for-writing-documentation</a> specifies how to write  parameters with a <code class="notranslate">shape</code> attribute in a docstring, e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array_parameter : {array-like, sparse matrix, dataframe} of shape (n_samples, n_features) or (n_samples,)
    This parameter accepts data in either of the mentioned forms, with one
    of the mentioned shapes. The default value is
    `np.ones(shape=(n_samples,))`.

list_param : list of int

typed_ndarray : ndarray of shape (n_samples,), dtype=np.int32

sample_weight : array-like of shape (n_samples,), default=None"><pre class="notranslate"><code class="notranslate">array_parameter : {array-like, sparse matrix, dataframe} of shape (n_samples, n_features) or (n_samples,)
    This parameter accepts data in either of the mentioned forms, with one
    of the mentioned shapes. The default value is
    `np.ones(shape=(n_samples,))`.

list_param : list of int

typed_ndarray : ndarray of shape (n_samples,), dtype=np.int32

sample_weight : array-like of shape (n_samples,), default=None
</code></pre></div>
<p dir="auto">There are a few instances in the developer's guide, examples and user guide that do still not follow that example:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/model_selection/plot_learning_curve.py (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="684843926" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18251" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18251/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18251">#18251</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/miscellaneous/plot_johnson_lindenstrauss_bound.py (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="684843926" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18251" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18251/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18251">#18251</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> doc/developers/develop.rst (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="681646013" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18191" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18191/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18191">#18191</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> doc/modules/clustering.rst (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="683951314" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18230" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18230/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18230">#18230</a>)</li>
</ul>
<h4 dir="auto">Description</h4>
<p dir="auto">When calling <code class="notranslate">sklearn.utils.estimator_checks.check_estimator</code> on a simple pipeline, an <code class="notranslate">AttributeError</code> exception is thrown.</p>
<p dir="auto">Either the <code class="notranslate">check_estimator</code> should be altered to support <code class="notranslate">Pipeline</code> objects or a separate <code class="notranslate">check_pipeline</code> utility should be created.</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression
from sklearn.utils.estimator_checks import check_estimator

pipe = make_pipeline(
    StandardScaler(),
    LinearRegression()
)

# BOOM!
check_estimator(pipe)

AttributeError: 'LinearRegression' object has no attribute 'transform'"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">pipeline</span> <span class="pl-k">import</span> <span class="pl-s1">make_pipeline</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">preprocessing</span> <span class="pl-k">import</span> <span class="pl-v">StandardScaler</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">linear_model</span> <span class="pl-k">import</span> <span class="pl-v">LinearRegression</span>
<span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">utils</span>.<span class="pl-s1">estimator_checks</span> <span class="pl-k">import</span> <span class="pl-s1">check_estimator</span>

<span class="pl-s1">pipe</span> <span class="pl-c1">=</span> <span class="pl-en">make_pipeline</span>(
    <span class="pl-v">StandardScaler</span>(),
    <span class="pl-v">LinearRegression</span>()
)

<span class="pl-c"># BOOM!</span>
<span class="pl-en">check_estimator</span>(<span class="pl-s1">pipe</span>)

<span class="pl-v">AttributeError</span>: <span class="pl-s">'LinearRegression'</span> <span class="pl-s1">object</span> <span class="pl-s1">has</span> <span class="pl-s1">no</span> <span class="pl-s1">attribute</span> <span class="pl-s">'transform'</span></pre></div>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">The expected result is to return <code class="notranslate">None</code>, following this example:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="foo = check_estimator(LinearRegression())
foo is None
True"><pre class="notranslate"><span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-en">check_estimator</span>(<span class="pl-v">LinearRegression</span>())
<span class="pl-s1">foo</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>
<span class="pl-c1">True</span></pre></div>
<h4 dir="auto">Actual Results</h4>
<p dir="auto">Traceback from Jupyter Notebook:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
&lt;ipython-input-52-d525f0d3391c&gt; in &lt;module&gt;()
      4 )
      5 
----&gt; 6 check_estimator(pipe)

/opt/conda/lib/python3.5/site-packages/sklearn/utils/estimator_checks.py in check_estimator(Estimator)
    263     for check in _yield_all_checks(name, estimator):
    264         try:
--&gt; 265             check(name, estimator)
    266         except SkipTest as message:
    267             # the only SkipTest thrown currently results from not

/opt/conda/lib/python3.5/site-packages/sklearn/utils/testing.py in wrapper(*args, **kwargs)
    289             with warnings.catch_warnings():
    290                 warnings.simplefilter(&quot;ignore&quot;, self.category)
--&gt; 291                 return fn(*args, **kwargs)
    292 
    293         return wrapper

/opt/conda/lib/python3.5/site-packages/sklearn/utils/estimator_checks.py in check_fit_score_takes_y(name, estimator_orig)
    812         func = getattr(estimator, func_name, None)
    813         if func is not None:
--&gt; 814             func(X, y)
    815             args = [p.name for p in signature(func).parameters.values()]
    816             if args[0] == &quot;self&quot;:

/opt/conda/lib/python3.5/site-packages/sklearn/pipeline.py in fit_transform(self, X, y, **fit_params)
    294             return Xt
    295         else:
--&gt; 296             return last_step.fit(Xt, y, **fit_params).transform(Xt)
    297 
    298     @if_delegate_has_method(delegate='_final_estimator')

AttributeError: 'LinearRegression' object has no attribute 'transform'"><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">AttributeError</span>                            <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">52</span><span class="pl-c1">-</span><span class="pl-s1">d525f0d3391c</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>()
      <span class="pl-c1">4</span> )
      <span class="pl-c1">5</span> 
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">6</span> <span class="pl-en">check_estimator</span>(<span class="pl-s1">pipe</span>)

<span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">conda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">sklearn</span><span class="pl-c1">/</span><span class="pl-s1">utils</span><span class="pl-c1">/</span><span class="pl-s1">estimator_checks</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">check_estimator</span>(<span class="pl-v">Estimator</span>)
    <span class="pl-c1">263</span>     <span class="pl-k">for</span> <span class="pl-s1">check</span> <span class="pl-c1">in</span> <span class="pl-en">_yield_all_checks</span>(<span class="pl-s1">name</span>, <span class="pl-s1">estimator</span>):
    <span class="pl-c1">264</span>         <span class="pl-k">try</span>:
<span class="pl-c1">-</span><span class="pl-c1">-&gt;</span> <span class="pl-c1">265</span>             <span class="pl-en">check</span>(<span class="pl-s1">name</span>, <span class="pl-s1">estimator</span>)
    <span class="pl-c1">266</span>         <span class="pl-k">except</span> <span class="pl-v">SkipTest</span> <span class="pl-k">as</span> <span class="pl-s1">message</span>:
    <span class="pl-c1">267</span>             <span class="pl-c"># the only SkipTest thrown currently results from not</span>

<span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">conda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">sklearn</span><span class="pl-c1">/</span><span class="pl-s1">utils</span><span class="pl-c1">/</span><span class="pl-s1">testing</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">wrapper</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
    <span class="pl-c1">289</span>             <span class="pl-k">with</span> <span class="pl-s1">warnings</span>.<span class="pl-en">catch_warnings</span>():
    <span class="pl-c1">290</span>                 <span class="pl-s1">warnings</span>.<span class="pl-en">simplefilter</span>(<span class="pl-s">"ignore"</span>, <span class="pl-s1">self</span>.<span class="pl-s1">category</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">291</span>                 <span class="pl-s1">return</span> <span class="pl-en">fn</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>)
    <span class="pl-c1">292</span> 
    <span class="pl-c1">293</span>         <span class="pl-s1">return</span> <span class="pl-s1">wrapper</span>

<span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">conda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">sklearn</span><span class="pl-c1">/</span><span class="pl-s1">utils</span><span class="pl-c1">/</span><span class="pl-s1">estimator_checks</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">check_fit_score_takes_y</span>(<span class="pl-s1">name</span>, <span class="pl-s1">estimator_orig</span>)
    <span class="pl-c1">812</span>         <span class="pl-s1">func</span> <span class="pl-c1">=</span> <span class="pl-en">getattr</span>(<span class="pl-s1">estimator</span>, <span class="pl-s1">func_name</span>, <span class="pl-c1">None</span>)
    <span class="pl-c1">813</span>         <span class="pl-k">if</span> <span class="pl-s1">func</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">None</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">814</span>             <span class="pl-en">func</span>(<span class="pl-v">X</span>, <span class="pl-s1">y</span>)
    <span class="pl-c1">815</span>             <span class="pl-s1">args</span> <span class="pl-c1">=</span> [<span class="pl-s1">p</span>.<span class="pl-s1">name</span> <span class="pl-s1">for</span> <span class="pl-s1">p</span> <span class="pl-c1">in</span> <span class="pl-en">signature</span>(<span class="pl-s1">func</span>).<span class="pl-s1">parameters</span>.<span class="pl-en">values</span>()]
    <span class="pl-c1">816</span>             <span class="pl-k">if</span> <span class="pl-s1">args</span>[<span class="pl-c1">0</span>] <span class="pl-c1">==</span> <span class="pl-s">"self"</span>:

<span class="pl-c1">/</span><span class="pl-s1">opt</span><span class="pl-c1">/</span><span class="pl-s1">conda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">5</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">sklearn</span><span class="pl-c1">/</span><span class="pl-s1">pipeline</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">fit_transform</span>(<span class="pl-s1">self</span>, <span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params</span>)
    <span class="pl-c1">294</span>             <span class="pl-k">return</span> <span class="pl-v">Xt</span>
    <span class="pl-c1">295</span>         <span class="pl-k">else</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">296</span>             <span class="pl-s1">return</span> <span class="pl-s1">last_step</span>.<span class="pl-en">fit</span>(<span class="pl-v">Xt</span>, <span class="pl-s1">y</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params</span>).<span class="pl-en">transform</span>(<span class="pl-v">Xt</span>)
    <span class="pl-c1">297</span> 
    <span class="pl-c1">298</span>     @<span class="pl-en">if_delegate_has_method</span>(<span class="pl-s1">delegate</span><span class="pl-c1">=</span><span class="pl-s">'_final_estimator'</span>)

<span class="pl-v">AttributeError</span>: <span class="pl-s">'LinearRegression'</span> <span class="pl-s1">object</span> <span class="pl-s1">has</span> <span class="pl-s1">no</span> <span class="pl-s1">attribute</span> <span class="pl-s">'transform'</span></pre></div>
<h4 dir="auto">Versions</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Linux-4.11.6-coreos-r1-x86_64-with-debian-8.8
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
NumPy 1.13.1
SciPy 0.19.1
Scikit-Learn 0.19.0"><pre class="notranslate"><code class="notranslate">Linux-4.11.6-coreos-r1-x86_64-with-debian-8.8
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
NumPy 1.13.1
SciPy 0.19.1
Scikit-Learn 0.19.0
</code></pre></div>