diff --git a/_sources/api.md.txt b/_sources/api.md.txt index abe3b50..a8e3913 100644 --- a/_sources/api.md.txt +++ b/_sources/api.md.txt @@ -88,6 +88,8 @@ You can use the `CombinedLoss` to create arbitrary, weighted sums of losses and .. autoclass:: qunfold.GaussianKernelTransformer .. autoclass:: qunfold.LaplacianKernelTransformer + +.. autoclass:: qunfold.GaussianRFFKernelTransformer ``` diff --git a/api.html b/api.html index 853bb2f..c61014a 100644 --- a/api.html +++ b/api.html @@ -93,6 +93,7 @@
EnergyKernelTransformer
GaussianKernelTransformer
LaplacianKernelTransformer
GaussianRFFKernelTransformer
The kernel-based KMM method by Dussap et al. (2023).
-This subclass of GenericMethod is instantiated with a LeastSquaresLoss and a KernelTransformer.
+class qunfold.KMM(kernel='energy', sigma=1, n_rff=1000, seed=None, **kwargs) +The kernel-based KMM method with random Fourier features by Dussap et al. (2023).
+This subclass of GenericMethod is instantiated with a LeastSquaresLoss and an instance of a KernelTransformer sub-class that corresponds to the kernel argument.
kernel (optional) – Which kernel to use. Can be a callable with the signature (X[y==i], X[y==j]) -> scalar or one of “energy”, “gaussian”, and “laplacian”. Defaults to “energy”.
sigma (optional) – A smoothing parameter in the gaussian and laplacian kernels. Defaults to 1.
**kwargs – Keyword arguments accepted by GenericMethod.
kernel (optional) – Which kernel to use. Can be a callable with the signature (X[y==i], X[y==j]) -> scalar or one of “energy”, “gaussian”, “laplacian” and “rff”. Defaults to “energy”.
sigma (optional) – A smoothing parameter that is used if kernel in [“gaussian”, “laplacian”, “rff”]. Defaults to 1.
n_rff (optional) – The number of random Fourier features if kernel == “rff”. Defaults to 1000.
**kwargs – Keyword arguments accepted by GenericMethod. The seed argument also controls the randomness of the random Fourier features if kernel == “rff”.
A kernel-based feature transformation, as it is used in KMM, that uses the gaussian kernel:
k(x, y) = exp(-||x - y||^2 / (2σ^2))
sigma (optional) – A smoothing parameter of the kernel function. Defaults to 1.
+sigma (optional) – A smoothing parameter of the kernel function. Defaults to 1.
preprocessor (optional) – Another AbstractTransformer that is called before this transformer. Defaults to None.
An efficient approximation of the GaussianKernelTransformer, as it is used in KMM, using random Fourier features.
+sigma (optional) – A smoothing parameter of the kernel function. Defaults to 1.
n_rff (optional) – The number of random Fourier features. Defaults to 1000.
preprocessor (optional) – Another AbstractTransformer that is called before this transformer. Defaults to None.
seed (optional) – Controls the randomness of the random Fourier features. Defaults to None.
A kernel-based feature transformation, as it is used in KMM.
+A general kernel-based feature transformation, as it is used in KMM. If you intend to use a Gaussian kernel or energy kernel, prefer their dedicated and more efficient implementations over this class.
Note
The methods of this transformer do not support setting average=False.
diff --git a/genindex.html b/genindex.html index f1065a3..2a6fa72 100644 --- a/genindex.html +++ b/genindex.html @@ -233,6 +233,10 @@