Category "valueerror"

Scikit-learn pipeline: Non-finite test scores error / Inconsistent number of samples

I have a dataframe with two columns of texts and only the POS tags (of the same texts), which I want to use for language classification. I am trying to use both

Python valueError: setting an array element with a sequence, TypeError: only size-1 arrays can be converted to Python scalars on MLP

I have this dataset (shape is (36,2)). x is a numerical pattern, y is a binary class (0,1) x y [0.2, 0.3, 0.5 ..... 0.5] 0 [0.1, 0.4, 0.5 ..... 0.9] 1 and so

Multiple int input in same line python [duplicate]

I want to take multiple integer inputs in the same line. I know I can take str input and then convert them into integer in the next line but i

Running a fine-tune model for my CNN : Value Error

So I am trying to use a pre-trained model on my data set to then compare it to my own cnn model. However, I see an error as soon as I try to do model. fit so mu

ValueError with pandas apply function returning output of variable shape

I have a pandas dataframe with three columns structured like this: Sample Start End <string> <int> <int> The values in "Start" and "End

ValueError: Incompatible indexer with Series while adding date to Date to Data Frame

I am new to python and I can't figure out why I get this error: ValueError: Incompatible indexer with Series. I am trying to add a date to my data frame. The da

ValueError: time data '02/03/2022' does not match format '%d/%m/%y '

How to return values only within a specific date range? I am new to python My code is: for report_date in REPORT_DATE_TYPES:

Simultaneously melt multiple columns in Python Pandas

wondering if pd.melt supports melting multiple columns. I have the below examples trying to have the value_vars as list of lists but i am getting an error: Val

How to loop through directories and clean files?

I am trying to loop through directories. My goal is to open the directory ff for modifications in the files. When I try open (ff, 'r') it does not work. Further