8000 DOC Add None as valid option to random_state in neural_network module… · alexshacked/scikit-learn@186f49a · GitHub
[go: up one dir, main page]

Skip to content

Commit 186f49a

Browse files
authored
DOC Add None as valid option to random_state in neural_network module (scikit-learn#18246)
1 parent b229a66 commit 186f49a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sklearn/neural_network/_rbm.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class BernoulliRBM(TransformerMixin, BaseEstimator):
5656
verbose : int, default=0
5757
The verbosity level. The default, zero, means silent mode.
5858
59-
random_state : integer or RandomState, default=None
59+
random_state : int, RandomState instance or None, default=None
6060
Determines random number generation for:
6161
6262
- Gibbs sampling from visible and hidden layers.
@@ -70,17 +70,17 @@ class BernoulliRBM(TransformerMixin, BaseEstimator):
7070
7171
Attributes
7272
----------
73-
intercept_hidden_ : array-like, shape (n_components,)
73+
intercept_hidden_ : array-like of shape (n_components,)
7474
Biases of the hidden units.
7575
76-
intercept_visible_ : array-like, shape (n_features,)
76+
intercept_visible_ : array-like of shape (n_features,)
7777
Biases of the visible units.
7878
79-
components_ : array-like, shape (n_components, n_features)
79+
components_ : array-like of shape (n_components, n_features)
8080
Weight matrix, where n_features in the number of
8181
visible units and n_components is the number of hidden units.
8282
83-
h_samples_ : array-like, shape (batch_size, n_components)
83+
h_samples_ : array-like of shape (batch_size, n_components)
8484
Hidden Activation sampled from the model distribution,
8585
where batch_size in the number of examples per minibatch and
8686
n_components is the number of hidden units.
@@ -159,7 +159,7 @@ def _sample_hiddens(self, v, rng):
159159
v : ndarray of shape (n_samples, n_features)
160160
Values of the visible layer to sample from.
161161
162-
rng : RandomState
162+
rng : RandomState instance
163163
Random number generator to use.
164164
165165
Returns
@@ -178,7 +178,7 @@ def _sample_visibles(self, h, rng):
178178
h : ndarray of shape (n_samples, n_components)
179179
Values of the hidden layer to sample from.
180180
181-
rng : RandomState
181+
rng : RandomState instance
182182
Random number generator to use.
183183
184184
Returns
@@ -274,7 +274,7 @@ def _fit(self, v_pos, rng):
274274
v_pos : ndarray of shape (n_samples, n_features)
275275
The data to use for training.
276276
277-
rng : RandomState
277+
rng : RandomState instance
278278
Random number generator to use for sampling.
279279
"""
280280
h_pos = self._mean_hiddens(v_pos)

0 commit comments

Comments
 (0)
0