Search code examples
pythoncrashscikit-learnsvc

python.exe has stopped working - svc


I'm trying to fit a simple SVC model on my dataset. As soon as I run my code, pop-up appears saying python.exe has stopped working.

Here is my code:

Xtrain, Xtest, Ytrain, Ytest = train_test_split(X, Y, test_size=0.3)
svc = SVC()
svc.fit(Xtrain, Ytrain)
y_pred = svc.predict(Xtest)
print "Accuracy: ", accuracy_score(y_pred, Ytest)

Any help?

P.S. I'm using jupyter notebooks with python 2.7


Solution

  • Turns out there was a timestamp in my X. I don't know why but by removing that, it started working fine.