X is assumed to be a precomputed kernel matrix. The target kernel will be
calculated with sklearn.metrics.pairwise.pairwise_kernels and combined
with X by a kernel diffusion procedure [1].
The default kernel is RBF, so that it calculates the ‘gaussian interaction
profile’ as described by [2].
n_iter (int, default=2) – Number of diffusion iterations.
n_neighbors (int, default=4) – n_neighbors parameter passed to kneighbors_graph for local similarity
calculation.
metric (str or callable, default="rbf") – The metric to use when calculating kernel between instances in a
feature array. If metric is a string, it must be one of the metrics
in sklearn.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS.
If metric is “precomputed”, y is assumed to be a kernel matrix.
Alternatively, if metric is a callable function, it is called on each
pair of instances (rows) and the resulting value recorded. The callable
should take two rows from y as input and return the corresponding
kernel value as a single number. This means that callables from
sklearn.metrics.pairwise are not allowed, as they operate on
matrices, not single samples. Use the string identifying the kernel
instead.
gamma (float, default=1.0) – gamma parameter of kernel function if metric is callable, ‘chi2’,
‘polynomial’, ‘rbf’, ‘laplacian’ or ‘sigmoid’.
gamma_scale ({'constant', 'squares', 'squared_errors', 'size'}, default='squares') – If not ‘constant’, divide gamma by S / y.shape[0], where
S = (y**2).sum(), if gamma_scale=’squares’,
((y-y.mean()) ** 2).sum() if ‘squared_errors’ and ‘y.size’ if ‘size’.
filter_params (bool, default=False) – Whether to filter invalid kernel parameters or not.
n_jobs (int, default=None) – The number of jobs to use for the kernel computation. This works by
breaking down the y matrix into n_jobs even slices and computing
them in parallel.
None means 1 unless in a joblib.parallel_backend context.
-1 means using all processors. See Glossary
for more details.
**kwds (optional keyword parameters) – Any further parameters are passed directly to the kernel function.
Combines provided similarity matrix X with kernel calculated over y
X is assumed to be a precomputed kernel matrix. The target kernel will be
calculated with sklearn.metrics.pairwise.pairwise_kernels and combined
with X simply by taking alpha*X + (1-alpha)*y_kernel.
The default kernel is RBF, so that it calculates the ‘gaussian interaction
profile’ as described by [1].
alpha (float, default=0.5) – Controls the fraction of the target information in the linear
combination with the provided similarities. alpha=1 means no change,
alpha=0 means no original X data will remain.
metric (str or callable, default="rbf") – The metric to use when calculating kernel between instances in a
feature array. If metric is a string, it must be one of the metrics
in sklearn.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS.
If metric is “precomputed”, y is assumed to be a kernel matrix.
Alternatively, if metric is a callable function, it is called on each
pair of instances (rows) and the resulting value recorded. The callable
should take two rows from y as input and return the corresponding
kernel value as a single number. This means that callables from
sklearn.metrics.pairwise are not allowed, as they operate on
matrices, not single samples. Use the string identifying the kernel
instead.
gamma (float, default=1.0) – gamma parameter of kernel function if metric is callable, ‘chi2’,
‘polynomial’, ‘rbf’, ‘laplacian’ or ‘sigmoid’.
gamma_scale ({'constant', 'squares', 'squared_errors', 'size'}, default='squares') – If not ‘constant’, divide gamma by S / y.shape[0], where
S = (y**2).sum(), if gamma_scale=’squares’,
((y-y.mean()) ** 2).sum() if ‘squared_errors’ and ‘y.size’ if ‘size’.
filter_params (bool, default=False) – Whether to filter invalid kernel parameters or not.
n_jobs (int, default=None) – The number of jobs to use for the kernel computation. This works by
breaking down the y matrix into n_jobs even slices and computing
them in parallel.
None means 1 unless in a joblib.parallel_backend context.
-1 means using all processors. See Glossary
for more details.
**kwds (optional keyword parameters) – Any further parameters are passed directly to the kernel function.