Skip to content

Commit 92f6d03

Browse files
author
Fabian Pedregosa
committed
Cosmetic changes in base.py
1 parent e0d6767 commit 92f6d03

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

scikits/learn/base.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
"""
2-
Base class for all estimators.
3-
4-
"""
1+
"""Base class for all estimators."""
52
# Author: Gael Varoquaux <[email protected]>
6-
73
# License: BSD Style
8-
import inspect
9-
import copy
104

5+
import copy, inspect
116
import numpy as np
12-
137
from .metrics import r2_score
148

159
################################################################################
@@ -21,9 +15,10 @@ def clone(estimator, safe=True):
2115
with the same parameters that has not been fit on any data.
2216
2317
Parameters
24-
============
18+
----------
2519
estimator: estimator object, or list, tuple or set of objects
2620
The estimator or group of estimators to be cloned
21+
2722
safe: boolean, optional
2823
If safe is false, clone will fall back to a deepcopy on objects
2924
that are not estimators.
@@ -59,11 +54,13 @@ def _pprint(params, offset=0, printer=repr):
5954
""" Pretty print the dictionnary 'params'
6055
6156
Parameters
62-
==========
57+
----------
6358
params: dict
6459
The dictionnary to pretty print
60+
6561
offset: int
6662
The offset in characters to add at the begin of each line.
63+
6764
printer:
6865
The function to convert entries to strings, typically
6966
the builtin str or repr
@@ -138,7 +135,7 @@ def _get_params(self, deep=True):
138135
""" Get parameters for the estimator
139136
140137
Parameters
141-
==========
138+
----------
142139
deep: boolean, optional
143140
If True, will return the parameters for this estimator and
144141
contained subobjects that are estimators.

0 commit comments

Comments
 (0)