Skip to content

Commit 9f43de3

Browse files
committed
DOC on attribute-parameter correspondence
1 parent 988f882 commit 9f43de3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/glossary.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ General Concepts
8989
:term:`feature_importances_`.
9090
Common attributes are listed :ref:`below <glossary_attributes>`.
9191

92+
A public attribute may have the same name as a constructor
93+
:term:`parameter`, with a ``_`` appended. This is used to store a
94+
validated or estimated version of the user's input. For example,
95+
:class:`decomposition.PCA` is constructed with an ``n_components``
96+
parameter. From this, together with other parameters and the data,
97+
PCA estimates the attribute ``n_components_``.
98+
9299
Further private attributes used in prediction/transformation/etc. may
93100
also be set when fitting. These begin with a single underscore and are
94101
not assured to be stable for public access.

0 commit comments

Comments
 (0)