qiskit.aqua.utils.optimize_svm¶
-
optimize_svm
(kernel_matrix, y, scaling=None, maxiter=500, show_progress=False, max_iters=None, lambda2=0.001)[source]¶ Solving quadratic programming problem for SVM; thus, some constraints are fixed.
- Parameters
kernel_matrix (
ndarray
) – NxN arrayy (
ndarray
) – Nx1 arrayscaling (
Optional
[float
]) – the scaling factor to renormalize the y, if it is None, use L2-norm of y for normalizationmaxiter (
int
) – number of iterations for QP solvershow_progress (
bool
) – showing the progress of QP solvermax_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