Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

ValueError: query data dimension must match training data dimension

example = np.array([7,4,3,2,4,5,3,6,7,4,2,3,5,6,8,4])
example = example.reshape(1, -1)

prediction = clf.predict(example)
print(prediction) # shouldn't error anymore
Comment

PREVIOUS NEXT
Code Example
Python :: image blur in python 
Python :: python autoclicker 
Python :: py to exe 
Python :: A Python Class Constructor 
Python :: python to c# converter 
Python :: how to check how many digits string has in python 
Python :: how to remove time in datetime in python 
Python :: python flask windows 
Python :: how to append string to another string in python 
Python :: python check array exists 
Python :: how to click a div element in selenium python 
Python :: Example Layout using grid() in tkinter 
Python :: how to return number in binary python 
Python :: discord.py get id of sent message 
Python :: calculate pointbiseral correlation scipy 
Python :: python reverse list 
Python :: tkinter canvas text size 
Python :: how to input data to the list in pythion 
Python :: delete and start fresh with db django 
Python :: Replace all the empty rows in the column with the value that you have identified 
Python :: swapping in python 
Python :: get vowels from string python 
Python :: how to get pytroch model layer name 
Python :: check if variable is empty python 
Python :: python script to convert dicom to niftii 
Python :: python suppress warnings in function 
Python :: pandas not a time nat 
Python :: pack tkinter 
Python :: namedtuple python 
Python :: python set timezone of datetime 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =