DOC Clarify return of cross_val_predict
@@ -726,15 +726,22 @@ def cross_val_predict(estimator, X, y=None, *, groups=None, cv=None,
- A str, giving an expression as a function of n_jobs,
as in '2*n_jobs'
- method : str, default='predict'
- Invokes the passed method name of the passed estimator. For
- method='predict_proba', the columns correspond to the classes
- in sorted order.
+ method : {'predict', 'predict_proba', 'predict_log_proba', \
+ 'decision_function'}, default='predict'
+ The method to be invoked by `estimator`.
Returns
-------
predictions : ndarray
- This is the result of calling ``method``
+ This is the result of calling `method`. Shape:
+
+ - When `method` is 'predict' and in special case where `method` is
+ 'decision_function' and the target is binary: (n_samples,)
+ - When `method` is one of {'predict_proba', 'predict_log_proba',
+ 'decision_function'} (unless special case above):
+ (n_samples, n_classes).
+ - If `estimator` is :term:`multioutput`, a third dimension
+ 'n_outputs' is added to the end of each shape above.
See also
--------
