Skip to content

Commit cad1ac1

Browse files
sinhrksamueller
authored andcommitted
DOC: Updated set_params doc
1 parent 642ae59 commit cad1ac1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/developers/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ The default value for ``deep`` should be true.
818818

819819
The ``set_params`` on the other hand takes as input a dict of the form
820820
``'parameter': value`` and sets the parameter of the estimator using this dict.
821+
Return value must be estimator itself.
821822

822823
While the ``get_params`` mechanism is not essential (see :ref:`cloning` below),
823824
the ``set_params`` function is necessary as it is used to set parameters during
@@ -835,6 +836,7 @@ implement the interface is::
835836
def set_params(self, **parameters):
836837
for parameter, value in parameters.items():
837838
self.setattr(parameter, value)
839+
return self
838840

839841

840842
Parameters and init

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy