The current implementation of the Kernel Optimization is somewhat misaligned with squlearn's design principles.
It would be beneficial to modify the implementation so that the KernelOptimizer is based on the KernelMatrixBase class. The inputs should include a KernelMatrix (KernelMatrixBase – currently either Fidelity or Projected Kernel), the loss function, and the optimizer. The optimization should be automatically triggered when the fit function in the high-level Kernel implementation is called.
The current implementation of the Kernel Optimization is somewhat misaligned with squlearn's design principles.
It would be beneficial to modify the implementation so that the KernelOptimizer is based on the KernelMatrixBase class. The inputs should include a KernelMatrix (KernelMatrixBase – currently either Fidelity or Projected Kernel), the loss function, and the optimizer. The optimization should be automatically triggered when the fit function in the high-level Kernel implementation is called.