Comments (3)
Hi, Aqua code is now deprecated and only critical fixes are being considered. The QSVM algorithm has been superseded by the QSVC algorithm in machine learning here https://github.com/Qiskit/qiskit-machine-learning/blob/main/qiskit_machine_learning/algorithms/classifiers/qsvc.py It likewise uses a QuantumKernel but is a more direct integration with sklearn in that the quantum kernel is passed to the sklearn SVC; looks like that might be useful to you. You might also like to look at this tutorial https://qiskit.org/documentation/machine-learning/tutorials/03_quantum_kernel.html. The integration with sklearn has other advantages such as access to other tools etc of sklearn that work with the SVC etc.
from qiskit-aqua.
Thank you, in the meantime it was confirmed that the call:
kernel_matrix_testing = result['kernel_matrix_testing']
returns [test x n_support_vectors], not [test x train], and in debugger it could be seen too, so our assumption of being able to extract both train and test kernel matrices from prior version of QSVM would not work.
In the new version it seems that if one wants both train and test kernel matrices, then those need to be calculated individually and cannot be extracted from the QSVC:
adhoc_matrix_train = adhoc_kernel.evaluate(x_vec=train_features)
adhoc_matrix_test = adhoc_kernel.evaluate(x_vec=test_features,
y_vec=train_features)
from qiskit-aqua.
For the QSVM you can see the code and what it produces when it runs here - https://github.com/Qiskit/qiskit-aqua/blob/main/qiskit/aqua/algorithms/classifiers/qsvm/_qsvm_binary.py#L133
The QSVC is just really just a very simple sub-class of sklearn SVC with the QuantumKernel. Using the QSVC is the same therefore as using the sklearn SVC. And as that tutorial I linked above shows you can use the QuantumKernel directly with sklearn SVC and you do not even need to use the QSVC if you don't want to.
from qiskit-aqua.
Related Issues (20)
- CPLEX cannot be installed in Python 3.8 HOT 1
- QAOA with ideal noise returns wrong result HOT 5
- One of the ML link is not working
- No module named 'qiskit.aqua.components.qfts' HOT 2
- CI fails to install cryptography 3.4.1 HOT 2
- Docplex 2.20 does not work without cplex HOT 1
- astroid2.5 causes lint errors HOT 2
- Pylint 2.6.1 stops by error HOT 4
- test_weighted_pauli_operator fails HOT 2
- QGAN fails with default generator when snapshot_dir is enabled HOT 4
- Revert #1440 i.e. remove PauliSumOp
- Pin dependent versions for the final deprecated release.
- Deprecate Aqua HOT 2
- TypeError: result() got an unexpected keyword argument 'wait' - bug in `QuantumInstance` HOT 2
- stable_set.get_operator() HOT 16
- Error in installing qiskit-aqua from source HOT 1
- Error in import of qiskit.aqua operator HOT 4
- QAOA for TSP on QISKIT HOT 12
- Bug in nakanishi_fujii_todo HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qiskit-aqua.