Python Forum
Type error in Cross_val_score
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Type error in Cross_val_score
#1
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.    

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    

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.    


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.
Reply


Messages In This Thread
Type error in Cross_val_score - by Vicral - Jul-20-2021, 12:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  GroupBy - Sum = Error [datetime64 type does not support sum operations] BSDevo 4 2,861 Oct-27-2023, 07:22 PM
Last Post: BSDevo
Question Help with linearRegression/cross_val_score vasu2798 5 3,279 May-21-2021, 01:37 PM
Last Post: Caprone
  type error array BrianPA 2 2,412 Jan-17-2021, 01:48 PM
Last Post: BrianPA
  Error binding parameter 0 - probably unsupported type. illmattic 7 10,371 Jul-18-2020, 09:32 PM
Last Post: illmattic
  Error Message: TypeError: unhashable type: 'set' twinpiques 4 18,973 May-22-2019, 02:31 PM
Last Post: twinpiques
  Error:unsupported operand type(s) for ** or pow(): 'list' and 'int' mcgrim 3 18,339 Mar-22-2019, 01:29 PM
Last Post: buran
  Type Error Confusion Oliver 4 14,488 Dec-06-2017, 03:20 PM
Last Post: Oliver
  type error and access violation error pyopengl hsunteik 0 3,329 Nov-04-2017, 04:51 AM
Last Post: hsunteik
  AUCPR of individual features using Random Forest (Error: unhashable Type) melissa 1 3,313 Jul-10-2017, 12:48 PM
Last Post: sparkz_alot
  Why am I getting a type error? WagmoreBarkless 7 7,539 Jan-19-2017, 10:29 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020