Open bero1403 opened 1 month ago
In the SVC
documentation (https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html) it is stated:
Dual coefficients of the support vector in the decision function (see [Mathematical formulation](https://scikit-learn.org/stable/modules/sgd.html#sgd-mathematical-formulation)), multiplied by their targets.
That's why it is np.abs(dual_coefs)
and there's no need to multiply by labels in the second term of the loss.
According to this documentation the binary labels are part of the equation of SVCLoss, https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.utils.loss_functions.SVCLoss.html#:~:text=This%20class%20provides,is%20defined%20as%3A However in this line of code we don't have the label in the loss function anymore. https://github.com/qiskit-community/qiskit-machine-learning/blob/253b190eba869b4d002e490323ee4139612f01c9/qiskit_machine_learning/utils/loss_functions/kernel_loss_functions.py#L125 Can you explain why?