Skip to content

Commit 2cfdc1c

Browse files
committed
Merge pull request #3940 from ragv/doc_own_estimators
[MRG] Added note to advice users not to __init__ params with trailing _ in custom defined estimators
2 parents a894b2e + 7e40e59 commit 2cfdc1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/developers/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,11 @@ The easiest and recommended way to accomplish this is to
829829
All logic behind estimator parameters,
830830
like translating string arguments into functions, should be done in ``fit``.
831831

832+
Also it is expected that parameters with trailing ``_`` are **not to be set
833+
inside the ``__init__`` method**. All and only the public attributes set by
834+
fit have a trailing ``_``. As a result the existence of parameters with
835+
trailing ``_`` is used to check if the estimator has been fitted.
836+
832837
.. _cloning:
833838

834839
Cloning

0 commit comments

Comments
 (0)