MCPcopy Create free account
hub / github.com/scikit-learn/scikit-learn / Nystroem

Class Nystroem

sklearn/kernel_approximation.py:859–1137  ·  view source on GitHub ↗

Approximate a kernel map using a subset of the training data. Constructs an approximate feature map for an arbitrary kernel using a subset of the data as basis. Read more in the :ref:`User Guide `. .. versionadded:: 0.13 Parameters ---------- k

Source from the content-addressed store, hash-verified

857
858
859class Nystroem(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator):
860 """Approximate a kernel map using a subset of the training data.
861
862 Constructs an approximate feature map for an arbitrary kernel
863 using a subset of the data as basis.
864
865 Read more in the :ref:`User Guide <nystroem_kernel_approx>`.
866
867 .. versionadded:: 0.13
868
869 Parameters
870 ----------
871 kernel : str or callable, default='rbf'
872 Kernel map to be approximated. A callable should accept two arguments
873 and the keyword arguments passed to this object as `kernel_params`, and
874 should return a floating point number.
875
876 gamma : float, default=None
877 Gamma parameter for the RBF, laplacian, polynomial, exponential chi2
878 and sigmoid kernels. Interpretation of the default value is left to
879 the kernel; see the documentation for sklearn.metrics.pairwise.
880 Ignored by other kernels.
881
882 coef0 : float, default=None
883 Zero coefficient for polynomial and sigmoid kernels.
884 Ignored by other kernels.
885
886 degree : float, default=None
887 Degree of the polynomial kernel. Ignored by other kernels.
888
889 kernel_params : dict, default=None
890 Additional parameters (keyword arguments) for kernel function passed
891 as callable object.
892
893 n_components : int, default=100
894 Number of features to construct.
895 How many data points will be used to construct the mapping.
896
897 random_state : int, RandomState instance or None, default=None
898 Pseudo-random number generator to control the uniform sampling without
899 replacement of `n_components` of the training data to construct the
900 basis kernel.
901 Pass an int for reproducible output across multiple function calls.
902 See :term:`Glossary <random_state>`.
903
904 n_jobs : int, default=None
905 The number of jobs to use for the computation. This works by breaking
906 down the kernel matrix into `n_jobs` even slices and computing them in
907 parallel.
908
909 ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
910 ``-1`` means using all processors. See :term:`Glossary <n_jobs>`
911 for more details.
912
913 .. versionadded:: 0.24
914
915 Attributes
916 ----------

Calls 2

StrOptionsClass · 0.90
IntervalClass · 0.90

Used in the wild real call sites across dependent graphs

searching dependent graphs…