Constructs an approximate feature map for an arbitrary kernel
using a subset of the data as basis.

Parameters:

kernel : string or callable, default=”rbf”

Kernel map to be approximated. A callable should accept two arguments
and the keyword arguments passed to this object as kernel_params, and
should return a floating point number.

n_components : int

Number of features to construct.
How many data points will be used to construct the mapping.

gamma : float, default=None

Gamma parameter for the RBF, polynomial, exponential chi2 and
sigmoid kernels. Interpretation of the default value is left to
the kernel; see the documentation for sklearn.metrics.pairwise.
Ignored by other kernels.

degree : float, default=3

Degree of the polynomial kernel. Ignored by other kernels.

coef0 : float, default=1

Zero coefficient for polynomial and sigmoid kernels.
Ignored by other kernels.

The method works on simple estimators as well as on nested objects
(such as pipelines). The former have parameters of the form
<component>__<parameter> so that it’s possible to update each
component of a nested object.