39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
---
|
||
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>
|
||
|