Issue 1:
Describe the issue linked to the documentation

https://scikit-learn.org/stable/developers/contributing.html#guidelines-for-writing-documentation specifies how to write parameters with a shape attribute in a docstring, e.g.

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

There are a few instances in the developer's guide, examples and user guide that do still not follow that example:

examples/model_selection/plot_learning_curve.py (#18251)

examples/miscellaneous/plot_johnson_lindenstrauss_bound.py (#18251)

doc/developers/develop.rst (#18191)

doc/modules/clustering.rst (#18230)

Issue 2:
Description

When calling sklearn.utils.estimator_checks.check_estimator on a simple pipeline, an AttributeError exception is thrown.

Either the check_estimator should be altered to support Pipeline objects or a separate check_pipeline utility should be created.

Steps/Code to Reproduce

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'

Expected Results

The expected result is to return None, following this example:

foo = check_estimator(LinearRegression())
foo is None
True

Actual Results

Traceback from Jupyter Notebook:

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-52-d525f0d3391c> in <module>()
4 )
5
----> 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:
--> 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("ignore", self.category)
--> 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:
--> 814 func(X, y)
815 args = [p.name for p in signature(func).parameters.values()]
816 if args[0] == "self":

/opt/conda/lib/python3.5/site-packages/sklearn/pipeline.py in fit_transform(self, X, y, **fit_params)
294 return Xt
295 else:
--> 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'

Versions

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