I'm getting the above error when trying to run cross validated prediction using two arrays. I've looked at previous posts on this error but haven't been able to fix the issue. Any help is much appreciated.
#Did customer churn
Y_col = ['recent_cus']
#train_cols = data.columns[1:]
# Index([gre, gpa, prestige_2, prestige_3, prestige_4], dtype=object)
Y = data[Y_col].as_matrix()
X =X_data
X = X.as_matrix()
display(X)
display(Y)
array([[ 9., 2., 0., ..., 2., 2., 0.],
[ 7., 0., 0., ..., 0., 4., 0.],
[ 9., 0., 0., ..., 0., 2., 0.],
...,
[ 9., 2., 0., ..., 2., 2., 0.],
[ 4., 0., 0., ..., 0., 8., 0.],
[ 7., 0., 0., ..., 2., 4., 0.]])
array([[0],
[0],
[0],
...,
[0],
[0],
[0]], dtype=int64)
clf = LogisticRegression(class_weight='auto')
predicted = cross_val_predict(clf, X, Y, cv=10)
fig, ax = plt.subplots()
ax.scatter(Y, predicted)
ax.plot([Y.min(), Y.max()], [Y.min(), Y.max()], 'k--', lw=4)
ax.set_xlabel('Measured')
ax.set_ylabel('Predicted')
plt.show()