Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.aqua.utils.optimize_svm

optimize_svm(kernel_matrix, y, scaling=None, maxiter=500, show_progress=False, max_iters=None, lambda2=0.001)

GitHub

Solving quadratic programming problem for SVM; thus, some constraints are fixed.

Parameters

  • kernel_matrix (ndarray) – NxN array
  • y (ndarray) – Nx1 array
  • scaling (Optional[float]) – the scaling factor to renormalize the y, if it is None, use L2-norm of y for normalization
  • maxiter (int) – number of iterations for QP solver
  • show_progress (bool) – showing the progress of QP solver
  • max_iters (Optional[int]) – Deprecated, use maxiter.
  • lambda2 (float) – L2 Norm regularization factor

Returns

Sx1 array, where S is the number of supports np.ndarray: Sx1 array, where S is the number of supports np.ndarray: Sx1 array, where S is the number of supports

Return type

np.ndarray

Raises

MissingOptionalLibraryError – If cvxpy is not installed

Was this page helpful?
Report a bug or request content on GitHub.