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

assign_training_parameters(parameter_values)

Fix the training parameters to numerical values.

evaluate(x_vec[, y_vec])

Construct kernel matrix for given data.