When using fit function to train the model, we encounter an error. First, we find the data. Here, the data type is object
only floating-point type can be accepted. We need to add “. Astype (‘int ‘)” after the data
y_test = y_test.astype('int')
Then it can run normally.