8000 DOC remove sphinx warnings when generating the doc · raghavrv/scikit-learn@a13a585 · GitHub
[go: up one dir, main page]

Skip to content

Commit a13a585

Browse files
lesteveogrisel
authored andcommitted
DOC remove sphinx warnings when generating the doc
and fixes a few other doc problems while I was at it. The main take-home message is to remember that you need a backslash when your parameter type description exceeds one line.
1 parent b1b43c1 commit a13a585

File tree

13 files changed

+2305
-2305
lines changed

13 files changed

+2305
-2305
lines changed

doc/modules/model_evaluation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ Receiver operating characteristic (ROC)
863863

864864
The function :func:`roc_curve` computes the
865865
`receiver operating characteristic curve, or ROC curve <http://en.wikipedia.org/wiki/Receiver_operating_characteristic>`_.
866-
Quoting Wikipedia :
866+
Quoting Wikipedia :
867867

868868
"A receiver operating characteristic (ROC), or simply ROC curve, is a
869869
graphical plot which illustrates the performance of a binary classifier

doc/whats_new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Documentation improvements
254254

255255
- Added silhouette plots for analysis of KMeans clustering using
256256
:func:`metrics.silhouette_samples` and :func:`metrics.silhouette_score`.
257-
See :ref:`examples_cluster_plot_kmeans_silhouette_analysis.py`
257+
See :ref:`example_cluster_plot_kmeans_silhouette_analysis.py`
258258

259259
Bug fixes
260260
.........

sklearn/isotonic.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ class IsotonicRegression(BaseEstimator, TransformerMixin, RegressorMixin):
198198
Maximum value of input array `X_` for right bound.
199199
200200
f_ : function
201-
The stepwise interpolating function that covers the domain
202-
X_.
201+
The stepwise interpolating function that covers the domain `X_`.
203202
204203
Notes
205204
-----

sklearn/lda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ class LDA(BaseEstimator, LinearClassifierMixin, TransformerMixin):
151151
- None: no shrinkage (default).
152152
- 'auto': automatic shrinkage using the Ledoit-Wolf lemma.
153153
- float between 0 and 1: fixed shrinkage parameter.
154+
154155
Note that shrinkage works only with 'lsqr' and 'eigen' solvers.
155156
156157
priors : array, optional, shape (n_classes,)

sklearn/linear_model/coordinate_descent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def lasso_path(X, y, eps=1e-3, n_alphas=100, alphas=None,
185185
alphas : array, shape (n_alphas,)
186186
The alphas along the path where models are computed.
187187
188-
coefs : array, shape (n_features, n_alphas) or
188+
coefs : array, shape (n_features, n_alphas) or \
189189
(n_outputs, n_features, n_alphas)
190190
Coefficients along the path.
191191
@@ -331,7 +331,7 @@ def enet_path(X, y, l1_ratio=0.5, eps=1e-3, n_alphas=100, alphas=None,
331331
alphas : array, shape (n_alphas,)
332332
The alphas along the path where models are computed.
333333
334-
coefs : array, shape (n_features, n_alphas) or
334+
coefs : array, shape (n_features, n_alphas) or \
335335
(n_outputs, n_features, n_alphas)
336336
Coefficients along the path.
337337
@@ -1815,8 +1815,8 @@ class MultiTaskElasticNetCV(LinearModelCV, RegressorMixin):
18151815
alpha_ : float
18161816
The amount of penalization chosen by cross validation
18171817
1818-
mse_path_ : array, shape (n_alphas, n_folds) or
1819-
(n_l1_ratio, n_alphas, n_folds)
1818+
mse_path_ : array, shape (n_alphas, n_folds) or \
1819+
(n_l1_ratio, n_alphas, n_folds)
18201820
mean square error for the test set on each fold, varying alpha
18211821
18221822
alphas_ : numpy array, shape (n_alphas,) or (n_l1_ratio, n_alphas)

sklearn/linear_model/logistic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,8 +1242,8 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator,
12421242
Array of C i.e. inverse of regularization parameter values used
12431243
for cross-validation.
12441244
1245-
coefs_paths_ : array, shape ``(n_folds, len(Cs_), n_features)`` or
1246-
``(n_folds, len(Cs_), n_features + 1)``
1245+
coefs_paths_ : array, shape ``(n_folds, len(Cs_), n_features)`` or \
1246+
``(n_folds, len(Cs_), n_features + 1)``
12471247
dict with classes as the keys, and the path of coefficients obtained
12481248
during cross-validating across each fold and then across each Cs
12491249
after doing an OvR for the corresponding class as values.

sklearn/metrics/classification.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,17 +1470,17 @@ def hinge_loss(y_true, pred_decision, labels=None, sample_weight=None):
14701470
References
14711471
----------
14721472
.. [1] `Wikipedia entry on the Hinge loss
1473-
<http://en.wikipedia.org/wiki/Hinge_loss>`_
1473+
<http://en.wikipedia.org/wiki/Hinge_loss>`_
14741474
14751475
.. [2] Koby Crammer, Yoram Singer. On the Algorithmic
14761476
Implementation of Multiclass Kernel-based Vector
14771477
Machines. Journal of Machine Learning Research 2,
14781478
(2001), 265-292
14791479
1480-
.. [3] 'L1 AND L2 Regularization for Multiclass Hinge Loss Models
1480+
.. [3] `L1 AND L2 Regularization for Multiclass Hinge Loss Models
14811481
by Robert C. Moore, John DeNero.
14821482
<http://www.ttic.edu/sigml/symposium2011/papers/
1483-
Moore+DeNero_Regularization.pdf>'
1483+
Moore+DeNero_Regularization.pdf>`_
14841484
14851485
Examples
14861486
--------
@@ -1501,6 +1501,7 @@ def hinge_loss(y_true, pred_decision, labels=None, sample_weight=None):
15011501
0.30...
15021502
15031503
In the multiclass case:
1504+
15041505
>>> X = np.array([[0], [1], [2], [3]])
15051506
>>> Y = np.array([0, 1, 2, 3])
15061507
>>> labels = np.array([0, 1, 2, 3])

sklearn/neighbors/ball_tree.c

Lines changed: 1142 additions & 1142 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sklearn/neighbors/binary_tree.pxi

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ cdef NodeData_t[::1] get_memview_NodeData_1D(
254254
CLASS_DOC = \
255255
"""{BinaryTree} for fast generalized N-point problems
256256
257-
{BinaryTree}(X, leaf_size=40, metric='minkowski', **kwargs)
257+
{BinaryTree}(X, leaf_size=40, metric='minkowski', \\**kwargs)
258258
259259
Parameters
260260
----------

sklearn/neighbors/kd_tree.c

Lines changed: 1142 additions & 1142 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sklearn/preprocessing/label.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,15 @@ def __init__(self, neg_label=0, pos_label=1, sparse_output=False):
282282
self.sparse_output = sparse_output
283283

284284
@property
285-
@deprecated("Attribute indicator_matrix_ is deprecated and will be "
286-
"removed in 0.17. Use 'y_type_ == 'multilabel-indicator'' "
285+
@deprecated("Attribute ``indicator_matrix_`` is deprecated and will be "
286+
"removed in 0.17. Use ``y_type_ == 'multilabel-indicator'`` "
287287
"instead")
288288
def indicator_matrix_(self):
289289
return self.y_type_ == 'multilabel-indicator'
290290

291291
@property
292-
@deprecated("Attribute multilabel_ is deprecated and will be removed "
293-
"in 0.17. Use 'y_type_.startswith('multilabel')' "
292+
@deprecated("Attribute ``multilabel_`` is deprecated and will be removed "
293+
"in 0.17. Use ``y_type_.startswith('multilabel')`` "
294294
"instead")
295295
def multilabel_(self):
296296
return self.y_type_.startswith('multilabel')

sklearn/svm/classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class LinearSVR(LinearModel, RegressorMixin):
232232
Penalty parameter C of the error term. The penalty is a squared
233233
l2 penalty. The bigger this parameter, the less regularization is used.
234234
235-
loss : string, 'epsilon_insensitive' or 'squared_epsilon_insensitive'
235+
loss : string, 'epsilon_insensitive' or 'squared_epsilon_insensitive' \
236236
(default='epsilon_insensitive')
237237
Specifies the loss function. 'l1' is the epsilon-insensitive loss
238238
(standard SVR) while 'l2' is the squared epsilon-insensitive loss.

sklearn/tree/tree.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ class DecisionTreeClassifier(BaseDecisionTree, ClassifierMixin):
444444
If None then unlimited number of leaf nodes.
445445
If not None then ``max_depth`` will be ignored.
446446
447-
class_weight : dict, list of dicts, "auto" or None, optional
448-
(default=None)
447+
class_weight : dict, list of dicts, "auto" or None, optional (default=None)
449448
Weights associated with classes in the form ``{class_label: weight}``.
450449
If not given, all classes are supposed to have 3DFF weight one. For
451450
multi-output problems, a list of dicts can be provided in the same

0 commit comments

Comments
 (0)
0