qiskit-documentation/docs/api/qiskit/0.26/qiskit.aqua.utils.optimize_...

39 lines
1.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: optimize_svm (v0.26)
description: API reference for qiskit.aqua.utils.optimize_svm in qiskit v0.26
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.aqua.utils.optimize_svm
---
<span id="qiskit-aqua-utils-optimize-svm" />
# qiskit.aqua.utils.optimize\_svm
<Function id="qiskit.aqua.utils.optimize_svm" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/utils/qp_solver.py" signature="optimize_svm(kernel_matrix, y, scaling=None, maxiter=500, show_progress=False, max_iters=None, lambda2=0.001)">
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**](qiskit.aqua.MissingOptionalLibraryError "qiskit.aqua.MissingOptionalLibraryError") If cvxpy is not installed
</Function>