Skip to content

Commit f1d95f2

Browse files
author
maheshakya
committed
Changed documentation in DummyRegressor
1 parent 8320331 commit f1d95f2

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

sklearn/dummy.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,25 @@ def predict_log_proba(self, X):
275275

276276
class DummyRegressor(BaseEstimator, RegressorMixin):
277277
"""
278-
DummyRegressor is a regressor that always predicts the mean of the training
279-
targets.
278+
DummyRegressor is a regressor is a regressor that make predictions
279+
using simple rules.
280280
281281
This regressor is useful as a simple baseline to compare with other
282282
(real) regressors. Do not use it for real problems.
283283
284+
Parameters
285+
----------
286+
strategy: str
287+
Strategy to use to generate predictions.
288+
* "mean": always predicts the mean of the training set
289+
* "median": always predicts the median of the training set
290+
* "constant": always predicts a constant value that is provided by
291+
the user.
292+
293+
constant: int or float or array of shape = [n_outputs]
294+
The explicit constant as predicted by the "constant" strategy. This
295+
parameter is useful only for the "constant" strategy.
296+
284297
Attributes
285298
----------
286299
`constant_' : float or array of shape [n_outputs]

0 commit comments

Comments
 (0)