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


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help with linearRegression/cross_val_score vasu2798 5 1,088 May-21-2021, 01:37 PM
Last Post: Caprone
  type error array BrianPA 2 916 Jan-17-2021, 01:48 PM
Last Post: BrianPA
  Error binding parameter 0 - probably unsupported type. illmattic 7 3,992 Jul-18-2020, 09:32 PM
Last Post: illmattic
  Error Message: TypeError: unhashable type: 'set' twinpiques 4 14,978 May-22-2019, 02:31 PM
Last Post: twinpiques
  Error:unsupported operand type(s) for ** or pow(): 'list' and 'int' mcgrim 3 7,864 Mar-22-2019, 01:29 PM
Last Post: buran
  Type Error Confusion Oliver 4 10,572 Dec-06-2017, 03:20 PM
Last Post: Oliver
  type error and access violation error pyopengl hsunteik 0 2,238 Nov-04-2017, 04:51 AM
Last Post: hsunteik
  AUCPR of individual features using Random Forest (Error: unhashable Type) melissa 1 2,055 Jul-10-2017, 12:48 PM
Last Post: sparkz_alot
  Why am I getting a type error? WagmoreBarkless 7 4,485 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