Kernel Ridge Regression¶
Kernel Ridge based classifier combining ridge regression (linear least-squares L2-norm) regression with the kernel trick
Documentation¶
Attributes¶
- dual_coef_
Representation of weight vector(s) in kernel space
- X_fit_
Training data, which is also required for prediction. If kernel == “precomputed” this is instead the precomputed training matrix, of shape (n_samples, n_samples).
Definition¶
Output ports¶
- model
Type: modelDescription: Model
Configuration¶
- Alpha (alpha)
Regularization strength; must be a positive float. Regularization improves the conditioning of the problem and reduces the variance of the estimates. Larger values specify stronger regularization. Alpha corresponds to
1 / (2C)in other linear models such asLogisticRegressionorLinearSVC. If an array is passed, penalties are assumed to be specific to the targets. Hence they must correspond in number. See ridge_regression for formula.- Zero coefficient (coef0)
Zero coefficient for polynomial and sigmoid kernels. Ignored by other kernels.
- Degree (degree)
Degree of the polynomial kernel. Ignored by other kernels.
- Gamma (gamma)
Gamma parameter for the RBF, laplacian, 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.
- Kernel (kernel)
Kernel mapping used internally. This parameter is directly passed to
pairwise_kernels. If kernel is a string, it must be one of the metrics in pairwise.PAIRWISE_KERNEL_FUNCTIONS or “precomputed”. If kernel is “precomputed”, X is assumed to be a kernel matrix. Alternatively, if kernel 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 X as input and return the corresponding kernel value as a single number. This means that callables fromsklearn.metrics.pairwiseare not allowed, as they operate on matrices, not single samples. Use the string identifying the kernel instead.
Examples¶
The node can be found in:
Implementation¶
- class node_regression.KernelRidge[source]