Python Forum
Type error in Cross_val_score - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Type error in Cross_val_score (/thread-34329.html)



Type error in Cross_val_score - Vicral - Jul-20-2021

I am creating a neural network that distinguishes between malignant and benign skin tumors using computer vision. I want to perform a k-fold validation with sklearn.model_selection.cross_val_score(estimator, X, y=None, *, groups=None, scoring=None, cv=None, n_jobs=None, verbose=0, fit_params=None, pre_dispatch='2*n_jobs', error_score=nan) but I think the error I have is that I don't know how to enter the y parameter correctly.[attachment=1180]

In an excel file I have by columns the following parameters: image_name patient_id esion_id sex age_approx anatom_site_general_challenge diagnosis target path_jpeg [attachment=1181]

I guess I should enter in the parameter y the value of target for each image, but I don't know how to do it.

In the images folder of the training and test there are only 584 images of each class in total while in the excel there are 33126 images.[attachment=1182]


Thank you very much in advance and I am sorry if the post is not correctly written and explained, it is the first one I do and I am open to criticism and learning. Best regards.