I used the following to make predictions from my keras model:
# fit the keras model on the dataset
ker_model.fit(xtrain, ytrain, epochs=200, verbose=0)
predictions = ker_model.predict(xtest)
predictions = predictions.astype(int)
predictions.mean()
predictions
However, the problem is, is that my predictions are in a nested array list. Meaning it looks as followed:
array([[0],
[0],
[0],
[1],
[1]])
How can I either ensure that my prediction is not eventually ending up in such a nested list, or unlist the predictions?
What I want my output to look like is:
array([0, 0, 0, 1, 1])