-
Notifications
You must be signed in to change notification settings - Fork 606
Open
Labels
area/docsConcerns documentation – problems, ideas, requestsConcerns documentation – problems, ideas, requestskind/bug-reportSomething doesn't seem to workSomething doesn't seem to work
Description
Hi all,
I think there is a possible data leakage in quantum data tutorial in
quantum/docs/tutorials/quantum_data.ipynb
Lines 783 to 790 in 8487280
"S_pqk, V_pqk = get_spectrum(\n", | |
" tf.reshape(tf.concat([x_train_pqk, x_test_pqk], 0), [-1, len(qubits) * 3]))\n", | |
"\n", | |
"S_original, V_original = get_spectrum(\n", | |
" tf.cast(tf.concat([x_train, x_test], 0), tf.float32), gamma=0.005)\n", | |
"\n", | |
"print('Eigenvectors of pqk kernel matrix:', V_pqk)\n", | |
"print('Eigenvectors of original kernel matrix:', V_original)" |
when calculating
quantum/docs/tutorials/quantum_data.ipynb
Line 731 in 8487280
" S, V = tf.linalg.eigh(KC_qs)\n", |
train and test data are concatenated in these calculations. I think it is wrong, and those should be separately calculated for each.
Metadata
Metadata
Assignees
Labels
area/docsConcerns documentation – problems, ideas, requestsConcerns documentation – problems, ideas, requestskind/bug-reportSomething doesn't seem to workSomething doesn't seem to work
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity