Hello Rohit Kulkarni,
Welcome to the MS Q&A platform.
As per the error message, it seems like you are passing a singleton array (an array with only one element) as an argument to the
classification_report function. This is causing the function to raise a
Please check the shape of your
ytest_predict arrays to ensure that they have the same number of elements
import numpy as np
If the shapes are the same then you can try reshaping the singleton array to be a one dimensional array using the
np.ravel(), , which should be a valid collection for the
If you are still facing the error, please provide more context or code snippets to understand the issue better.