0
$\begingroup$

I am trying to run QSVM qiskit code with my custom dataset which I am loading as a pandas dataframe. When I execute the part below with my own dataset in the place of breast_cancer, it gives error " Dataframe object not callable"

feature_dim = 2
sample_total, training_input, test_input, class_labels = breast_cancer(
    training_size=20,
    test_size=10,
    n=feature_dim,
    plot_data=True
)

Please suggest how do i use my csv file as a dataset for QSVM qiskit code

$\endgroup$

1 Answer 1

0
$\begingroup$

Qiskit has an inbuilt function for the breast cancer dataset. To utilise your custom dataset, use the train_test_split method in sklearn to run the code you described.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.