Skip to content

Commit

Permalink
Update Code in part 4 (#706)
Browse files Browse the repository at this point in the history
* Update Code Part 4

* Typo code update

---------

Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com>
  • Loading branch information
FelixLehn and adekusar-drl authored Nov 1, 2023
1 parent 85687d6 commit 77227e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/tutorials/03_quantum_kernel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
"outputs": [],
"source": [
"matrix_train = qpca_kernel.evaluate(x_vec=train_features)\n",
"matrix_test = qpca_kernel.evaluate(x_vec=test_features, y_vec=test_features)"
"matrix_test = qpca_kernel.evaluate(x_vec=test_features, y_vec=train_features)"
]
},
{
Expand Down Expand Up @@ -755,7 +755,7 @@
"\n",
"kernel_pca_q = KernelPCA(n_components=2, kernel=\"precomputed\")\n",
"train_features_q = kernel_pca_q.fit_transform(matrix_train)\n",
"test_features_q = kernel_pca_q.fit_transform(matrix_test)"
"test_features_q = kernel_pca_q.transform(matrix_test)"
]
},
{
Expand All @@ -774,7 +774,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Logistic regression score: 1.0\n"
"Logistic regression score: 0.9\n"
]
}
],
Expand Down

0 comments on commit 77227e3

Please sign in to comment.