From 39b9fb02bde0d7cef5afb314d8c72b5f4c2cd5c0 Mon Sep 17 00:00:00 2001 From: FelixLehn <70092091+FelixLehn@users.noreply.github.com> Date: Thu, 2 Nov 2023 00:50:17 +0100 Subject: [PATCH] Update Code in part 4 (#706) * Update Code Part 4 * Typo code update --------- Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com> --- docs/tutorials/03_quantum_kernel.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/03_quantum_kernel.ipynb b/docs/tutorials/03_quantum_kernel.ipynb index f6598c954..5380bfa5f 100644 --- a/docs/tutorials/03_quantum_kernel.ipynb +++ b/docs/tutorials/03_quantum_kernel.ipynb @@ -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)" ] }, { @@ -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)" ] }, { @@ -774,7 +774,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Logistic regression score: 1.0\n" + "Logistic regression score: 0.9\n" ] } ],