Skip to content

Commit cddbc6a

Browse files
mandjevantglemaitre
andcommitted
DOC Various documentation improvements (scikit-learn#21764)
Co-authored-by: Guillaume Lemaitre <[email protected]>
1 parent 6df82d0 commit cddbc6a

File tree

5 files changed

+18
-28
lines changed

5 files changed

+18
-28
lines changed

sklearn/kernel_ridge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class KernelRidge(MultiOutputMixin, RegressorMixin, BaseEstimator):
5252
Kernel mapping used internally. This parameter is directly passed to
5353
:class:`~sklearn.metrics.pairwise.pairwise_kernel`.
5454
If `kernel` is a string, it must be one of the metrics
55-
in `pairwise.PAIRWISE_KERNEL_FUNCTIONS`.
55+
in `pairwise.PAIRWISE_KERNEL_FUNCTIONS` or "precomputed".
5656
If `kernel` is "precomputed", X is assumed to be a kernel matrix.
5757
Alternatively, if `kernel` is a callable function, it is called on
5858
each pair of instances (rows) and the resulting value recorded. The

sklearn/mixture/_gaussian_mixture.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,10 @@ class GaussianMixture(BaseMixture):
473473
String describing the type of covariance parameters to use.
474474
Must be one of:
475475
476-
'full'
477-
each component has its own general covariance matrix
478-
'tied'
479-
all components share the same general covariance matrix
480-
'diag'
481-
each component has its own diagonal covariance matrix
482-
'spherical'
483-
each component has its own single variance
476+
- 'full': each component has its own general covariance matrix.
477+
- 'tied': all components share the same general covariance matrix.
478+
- 'diag': each component has its own diagonal covariance matrix.
479+
- 'spherical': each component has its own single variance.
484480
485481
tol : float, default=1e-3
486482
The convergence threshold. EM iterations will stop when the

sklearn/multiclass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ class OutputCodeClassifier(MetaEstimatorMixin, ClassifierMixin, BaseEstimator):
932932
An estimator object implementing :term:`fit` and one of
933933
:term:`decision_function` or :term:`predict_proba`.
934934
935-
code_size : float
935+
code_size : float, default=1.5
936936
Percentage of the number of classes to be used to create the code book.
937937
A number between 0 and 1 will require fewer classifiers than
938938
one-vs-the-rest. A number greater than 1 will require more classifiers

sklearn/neighbors/_nearest_centroid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class NearestCentroid(ClassifierMixin, BaseEstimator):
3030
3131
Parameters
3232
----------
33-
metric : str or callable
33+
metric : str or callable, default="euclidian"
3434
The metric to use when calculating distance between instances in a
3535
feature array. If metric is a string or callable, it must be one of
3636
the options allowed by

sklearn/preprocessing/_discretization.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,21 @@ class KBinsDiscretizer(TransformerMixin, BaseEstimator):
3737
encode : {'onehot', 'onehot-dense', 'ordinal'}, default='onehot'
3838
Method used to encode the transformed result.
3939
40-
onehot
41-
Encode the transformed result with one-hot encoding
42-
and return a sparse matrix. Ignored features are always
43-
stacked to the right.
44-
onehot-dense
45-
Encode the transformed result with one-hot encoding
46-
and return a dense array. Ignored features are always
47-
stacked to the right.
48-
ordinal
49-
Return the bin identifier encoded as an integer value.
40+
- 'onehot': Encode the transformed result with one-hot encoding
41+
and return a sparse matrix. Ignored features are always
42+
stacked to the right.
43+
- 'onehot-dense': Encode the transformed result with one-hot encoding
44+
and return a dense array. Ignored features are always
45+
stacked to the right.
46+
- 'ordinal': Return the bin identifier encoded as an integer value.
5047
5148
strategy : {'uniform', 'quantile', 'kmeans'}, default='quantile'
5249
Strategy used to define the widths of the bins.
5350
54-
uniform
55-
All bins in each feature have identical widths.
56-
quantile
57-
All bins in each feature have the same number of points.
58-
kmeans
59-
Values in each bin have the same nearest center of a 1D k-means
60-
cluster.
51+
- 'uniform': All bins in each feature have identical widths.
52+
- 'quantile': All bins in each feature have the same number of points.
53+
- 'kmeans': Values in each bin have the same nearest center of a 1D
54+
k-means cluster.
6155
6256
dtype : {np.float32, np.float64}, default=None
6357
The desired data-type for the output. If None, output dtype is

0 commit comments

Comments
 (0)