0
$\begingroup$

I encountered a problem when I was doing quantum support vector machine experiments: when I was doing quantum kernel alignment, I saw that the example given by qiskit was SVC_Loss: https://qiskit.org/documentation/machine-learning/stubs/qiskit_machine_learning.utils.loss_functions.SVCLoss.html#qiskit_machine_learning.utils.loss_functions.SVCLoss

Its core code is: SVCLoss = \sum_{i} a_i - 0.5 \sum_{i,j} a_i a_j y_{i} y_{j} K_θ(x_i, x_j)

svc_loss = np.sum(np.abs(dual_coefs)) - (0.5 * (dual_coefs.T @ kmatrix @ dual_coefs))

I wonder how the loss function of svr looks like: SVRLoss = \sum_{i} a_i + 0.5 \sum_{i,j} a_i a_j y_{i} y_{j} K_θ(x_i, x_j)

svr_loss = np.sum(np.abs(dual_coefs)) + (0.5 * (dual_coefs.T @ kmatrix @ dual_coefs))

is that so?

Thanks for your prompt answer, it was very helpful to me!

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.