Skip to content

Commit 1582926

Browse files
thomasjpfanjnothman
authored andcommitted
[MRG] DOC Adds _pairwise property to dev docs (scikit-learn#13094)
1 parent 55f431d commit 1582926

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

doc/developers/contributing.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ following rules before submitting:
115115
`new algorithm requirements
116116
<http://scikit-learn.org/stable/faq.html#what-are-the-inclusion-criteria-for-new-algorithms>`_.
117117

118-
- If you are submitting a bug report, we strongly encourage you to follow the guidelines in
118+
- If you are submitting a bug report, we strongly encourage you to follow the guidelines in
119119
:ref:`filing_bugs`.
120120

121121
.. _filing_bugs:
@@ -193,7 +193,7 @@ then submit a "pull request" (PR):
193193
account on the GitHub user account. For more details on how to fork a
194194
repository see `this guide <https://help.github.com/articles/fork-a-repo/>`_.
195195

196-
3. Clone your fork of the scikit-learn repo from your GitHub account to your
196+
3. Clone your fork of the scikit-learn repo from your GitHub account to your
197197
local disk::
198198

199199
$ git clone [email protected]:YourLogin/scikit-learn.git
@@ -203,7 +203,7 @@ then submit a "pull request" (PR):
203203

204204
$ pip install --editable .
205205

206-
for more details about advanced installation, see the
206+
for more details about advanced installation, see the
207207
:ref:`install_bleeding_edge` section.
208208

209209
5. Create a branch to hold your development changes::
@@ -342,8 +342,8 @@ rules before submitting a pull request:
342342
documentation, see the :ref:`contribute_documentation` section.
343343

344344
* The documentation should also include expected time and space complexity
345-
of the algorithm and scalability, e.g. "this algorithm can scale to a
346-
large number of samples > 100000, but does not scale in dimensionality:
345+
of the algorithm and scalability, e.g. "this algorithm can scale to a
346+
large number of samples > 100000, but does not scale in dimensionality:
347347
n_features is expected to be lower than 100".
348348

349349
You can also check for common programming errors with the following tools:
@@ -390,7 +390,7 @@ Continuous Integration (CI)
390390
* Travis is used for testing on Linux platforms
391391
* Appveyor is used for testing on Windows platforms
392392
* CircleCI is used to build the docs for viewing, for linting with flake8, and
393-
for testing with PyPy on Linux
393+
for testing with PyPy on Linux
394394

395395
Please note that if one of the following markers appear in the latest commit
396396
message, the following actions are taken.
@@ -489,7 +489,7 @@ documents live in the source code repository under the ``doc/`` directory.
489489

490490
You can edit the documentation using any text editor, and then generate the
491491
HTML output by typing ``make html`` from the ``doc/`` directory. Alternatively,
492-
``make`` can be used to quickly generate the documentation without the example
492+
``make`` can be used to quickly generate the documentation without the example
493493
gallery. The resulting HTML files will be placed in ``_build/html/stable`` and are viewable
494494
in a web browser. See the ``README``file in the ``doc/`` directory for more information.
495495

@@ -548,10 +548,10 @@ details, and give intuition to the reader on what the algorithm does.
548548

549549
Basically, to elaborate on the above, it is best to always
550550
start with a small paragraph with a hand-waving explanation of what the
551-
method does to the data. Then, it is very helpful to point out why the feature is
551+
method does to the data. Then, it is very helpful to point out why the feature is
552552
useful and when it should be used - the latter also including "big O"
553-
(:math:`O\left(g\left(n\right)\right)`) complexities of the algorithm, as opposed
554-
to just *rules of thumb*, as the latter can be very machine-dependent. If those
553+
(:math:`O\left(g\left(n\right)\right)`) complexities of the algorithm, as opposed
554+
to just *rules of thumb*, as the latter can be very machine-dependent. If those
555555
complexities are not available, then rules of thumb may be provided instead.
556556

557557
Secondly, a generated figure from an example (as mentioned in the previous
@@ -1225,6 +1225,14 @@ Optional Arguments
12251225
In iterative algorithms, the number of iterations should be specified by
12261226
an integer called ``n_iter``.
12271227

1228+
Pairwise Attributes
1229+
^^^^^^^^^^^^^^^^^^^
1230+
1231+
An estimator that accept ``X`` of shape ``(n_samples, n_samples)`` and defines
1232+
a :term:`_pairwise` property equal to ``True`` allows for cross-validation of
1233+
the dataset, e.g. when ``X`` is a precomputed kernel matrix. Specifically,
1234+
the :term:`_pairwise` property is used by ``utils.metaestimators._safe_split``
1235+
to slice rows and columns.
12281236

12291237
Rolling your own estimator
12301238
==========================

0 commit comments

Comments
 (0)