Skip to content

Commit aeffba3

Browse files
Mariam-keMariamMariam-ke
authored
DOC Made required changes to kernel_approximation.py (scikit-learn#17473)
* updated file changes * changed random state possible value * changed random state possible value * changed suggested changes * changed suggested changes * changed suggested changes Co-authored-by: Mariam <[email protected]> Co-authored-by: Mariam-ke <[email protected]>
1 parent d8be25f commit aeffba3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

sklearn/kernel_approximation.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class RBFSampler(TransformerMixin, BaseEstimator):
3939
Number of Monte Carlo samples per original feature.
4040
Equals the dimensionality of the computed feature space.
4141
42-
random_state : int, RandomState instance or None, optional (default=None)
42+
random_state : int, RandomState instance or None, default=None
4343
Pseudo-random number generator to control the generation of the random
4444
weights and random offset when fitting the training data.
4545
Pass an int for reproducible output across multiple function calls.
@@ -153,7 +153,7 @@ class SkewedChi2Sampler(TransformerMixin, BaseEstimator):
153153
number of Monte Carlo samples per original feature.
154154
Equals the dimensionality of the computed feature space.
155155
156-
random_state : int, RandomState instance or None, optional (default=None)
156+
random_state : int, RandomState instance or None, default=None
157157
Pseudo-random number generator to control the generation of the random
158158
weights and random offset when fitting the training data.
159159
Pass an int for reproducible output across multiple function calls.
@@ -271,9 +271,9 @@ class AdditiveChi2Sampler(TransformerMixin, BaseEstimator):
271271
272272
Parameters
273273
----------
274-
sample_steps : int, optional
274+
sample_steps : int, default=2
275275
Gives the number of (complex) sampling points.
276-
sample_interval : float, optional
276+
sample_interval : float, default=None
277277
Sampling interval. Must be specified when sample_steps not in {1,2,3}.
278278
279279
Attributes
@@ -364,7 +364,7 @@ def transform(self, X):
364364
365365
Returns
366366
-------
367-
X_new : {array, sparse matrix}, \
367+
X_new : {ndarray, sparse matrix}, \
368368
shape = (n_samples, n_features * (2*sample_steps + 1))
369369
Whether the return value is an array of sparse matrix depends on
370370
the type of the input X.
@@ -473,15 +473,15 @@ class Nystroem(TransformerMixin, BaseEstimator):
473473
degree : float, default=None
474474
Degree of the polynomial kernel. Ignored by other kernels.
475475
476-
kernel_params : mapping of string to any, optional
476+
kernel_params : dict, default=None
477477
Additional parameters (keyword arguments) for kernel function passed
478478
as callable object.
479479
480480
n_components : int
481481
Number of features to construct.
482482
How many data points will be used to construct the mapping.
483483
484-
random_state : int, RandomState instance or None, optional (default=None)
484+
random_state : int, RandomState instance or None, default=None
485485
Pseudo-random number generator to control the uniform sampling without
486486
replacement of n_components of the training data to construct the basis
487487
kernel.
@@ -490,13 +490,13 @@ class Nystroem(TransformerMixin, BaseEstimator):
490490
491491
Attributes
492492
----------
493-
components_ : array, shape (n_components, n_features)
493+
components_ : ndarray of shape (n_components, n_features)
494494
Subset of training points used to construct the feature map.
495495
496-
component_indices_ : array, shape (n_components)
496+
component_indices_ : ndarray of shape (n_components)
497497
Indices of ``components_`` in the training set.
498498
499-
normalization_ : array, shape (n_components, n_components)
499+
normalization_ : ndarray of shape (n_components, n_components)
500500
Normalization matrix needed for embedding.
501501
Square root of the kernel matrix on ``components_``.
502502
@@ -601,7 +601,7 @@ def transform(self, X):
601601
602602
Returns
603603
-------
604-
X_transformed : array, shape=(n_samples, n_components)
604+
X_transformed : ndarray of shape (n_samples, n_components)
605605
Transformed data.
606606
"""
607607
check_is_fitted(self)

0 commit comments

Comments
 (0)