TrainableKernel#
- class TrainableKernel(*, training_parameters=None, **kwargs)[소스]#
기반 클래스:
BaseKernel
,ABC
An abstract definition of the ability to train kernel via specifying training parameters.
- 매개변수:
training_parameters (ParameterVector | Sequence[Parameter] | None) – a sequence of training parameters.
**kwargs – Additional parameters may be used by the super class.
Attributes
- enforce_psd#
Returns
True
if the kernel matrix is required to project to the closest positive semidefinite matrix.
- feature_map#
Returns the feature map of this kernel.
- num_features#
Returns the number of features in this kernel.
- num_training_parameters#
Returns the number of training parameters.
- parameter_values#
Returns numerical values assigned to the training parameters as a numpy array.
- training_parameters#
Returns the vector of training parameters.
Methods
- abstract evaluate(x_vec, y_vec=None)#
Construct kernel matrix for given data.
If y_vec is None, self inner product is calculated.
- 매개변수:
x_vec (np.ndarray) – 1D or 2D array of datapoints, NxD, where N is the number of datapoints, D is the feature dimension
y_vec (np.ndarray | None) – 1D or 2D array of datapoints, MxD, where M is the number of datapoints, D is the feature dimension
- 반환:
2D matrix, NxM
- 반환 형식:
np.ndarray