8000 DOC Fix some new sphinx warnings. (#15560) · rasbt/scikit-learn@2de018b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2de018b

Browse files
cmarmothomasjpfan
authored andcommitted
DOC Fix some new sphinx warnings. (scikit-learn#15560)
1 parent 2558ccc commit 2de018b

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

doc/modules/compose.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -467,19 +467,19 @@ with a :func:`~sklearn.compose.make_column_selector`. The
467467
:func:`~sklearn.compose.make_column_selector` is used to select columns based
468468
on data type or column name::
469469

470-
>>> from sklearn.preprocessing import StandardScaler
471-
>>> from sklearn.compose import make_column_selector
472-
>>> ct = ColumnTransformer([
473-
... ('scale', StandardScaler(),
474-
... make_column_selector(dtype_include=np.number)),
475-
... ('onehot',
476-
... OneHotEncoder(),
477-
... make_column_selector(pattern='city', dtype_include=object))])
478-
>>> ct.fit_transform(X)
479-
array([[ 0.904..., 0. , 1. , 0. , 0. ],
480-
[-1.507..., 1.414..., 1. , 0. , 0. ],
481-
[-0.301..., 0. , 0. , 1. , 0. ],
482-
[ 0.904..., -1.414..., 0. , 0. , 1. ]])
470+
>>> from sklearn.preprocessing import StandardScaler
471+
>>> from sklearn.compose import make_column_selector
472+
>>> ct = ColumnTransformer([
473+
... ('scale', StandardScaler(),
474+
... make_column_selector(dtype_include=np.number)),
475+
... ('onehot',
476+
... OneHotEncoder(),
477+
... make_column_selector(pattern='city', dtype_include=object))])
478+
>>> ct.fit_transform(X)
479+
array([[ 0.904..., 0. , 1. , 0. , 0. ],
480+
[-1.507..., 1.414..., 1. , 0. , 0. ],
481+
[-0.301..., 0. , 0. , 1. , 0. ],
482+
[ 0.904..., -1.414..., 0. , 0. , 1. ]])
483483

484484
Strings can reference columns if the input is a DataFrame, integers are always
485485
interpreted as the positional columns.

doc/whats_new/v0.22.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,12 @@ Changelog
157157
`affinity='cosine'` and `X` has samples that are all-zeros. :pr:`7943` by
158158
:user:`mthorrell`.
159159

160-
161160
:mod:`sklearn.compose`
162161
......................
163162

164163
- |Feature| Adds :func:`compose.make_column_selector` which is used with
165164
:class:`compose.ColumnTransformer` to select DataFrame columns on the basis
166-
of name and dtype. :pr:`12303` by `Thomas Fan `_.
165+
of name and dtype. :pr:`12303` by `Thomas Fan`_.
167166

168167
- |Fix| Fixed a bug in :class:`compose.ColumnTransformer` which failed to
169168
select the proper columns when using a boolean list, with NumPy older than

sklearn/mixture/_bayesian_mixture.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ class BayesianGaussianMixture(BaseMixture):
261261
The precision prior on the mean distribution (Gaussian).
262262
Controls the extent of where means can be placed.
263263
Larger values concentrate the cluster means around `mean_prior`.
264-
If mean_precision_prior is set to None, mean_precision_prior_ is set to
265-
1.
264+
If mean_precision_prior is set to None, `mean_precision_prior_` is set
265+
to 1.
266266
267267
mean_precision_ : array-like, shape (n_components,)
268268
The precision of each components on the mean distribution (Gaussian).

0 commit comments

Comments
 (0)
0