mcmodels.regressors.nonparametric.kernels.Polynomial

class mcmodels.regressors.nonparametric.kernels.Polynomial(shape=1.0, support=1.0, shape_bounds=(1e-05, 100000.0), support_bounds=(0, 100000.0))[source]

Polynomial kernel.

The class of Polynomial kernels can …

K(x, y) = (1 + (d(x,y)/support)^2)^shape

Note

not to be confused with the Polynomial kernel defined in sklearn.pairwise defined as:

K(x, y) = (gamma x^T y - c_0)^degree
Parameters:
shape : float, optional, default: 1.0

The shape parameter of the kernel. A shape of 0 is the Uniform kernel (or boxcar kernel). As the shape approaches infinity, the kernel approximates the Gaussian kernel in the limit.

support : float, optional, default: 1.0

The support (symmetric) of the kernel such that the kernel is equal to exactly zero where d(x, y) > support.

shape_bounds : pair of floats >= 0, optional, default: (1e-5, 1e5)

The lower and upper bound on shape.

support_bounds : pair of floats >= 0, optional, default: (1e-5, 1e5)

The lower and upper bound on support.

Attributes:
anisotropic
bounds

Returns the log-transformed bounds on the theta.

coefficient

Coefficient to scale the kernel to have int_D K(u)du == 1

hyperparameter_shape
hyperparameter_support
hyperparameters

Returns a list of all hyperparameter specifications.

n_dims

Returns the number of non-fixed hyperparameters of the kernel.

theta

Returns the (flattened, log-transformed) non-fixed hyperparameters.

Methods

__call__(self, X[, Y, eval_gradient]) Return the kernel k(X, Y) and optionally its gradient.
clone_with_theta(self, theta) Returns a clone of self with given hyperparameters theta.
diag(self, X) Returns the diagonal of the kernel k(X, X).
get_params(self[, deep]) Get parameters of this kernel.
is_stationary(self) Returns whether the kernel is stationary.
set_params(self, \*\*params) Set the parameters of this kernel.
__init__(self, shape=1.0, support=1.0, shape_bounds=(1e-05, 100000.0), support_bounds=(0, 100000.0))[source]

Methods

__init__(self[, shape, support, …])
clone_with_theta(self, theta) Returns a clone of self with given hyperparameters theta.
diag(self, X) Returns the diagonal of the kernel k(X, X).
get_params(self[, deep]) Get parameters of this kernel.
is_stationary(self) Returns whether the kernel is stationary.
set_params(self, \*\*params) Set the parameters of this kernel.