Skip to content

Possible data leakage in quantum/docs/tutorials /quantum_data.ipynb #828

Open
@OkuyanBoga

Description

@OkuyanBoga

Hi all,

I think there is a possible data leakage in quantum data tutorial in

"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

" 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

No one assigned

    Labels

    area/docsConcerns documentation – problems, ideas, requestskind/bug-reportSomething doesn't seem to work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions