0

I've built an NLTK classifier and attempting to use the following :

import nltk.classify
from sklearn.svm import LinearSVC
training_set2 = nltk.classify.apply_features(extract_features,tweets)
classifier2 = nltk.classify.SklearnClassifier(LinearSVC())
classifier2.train(training_set2)

With jupyter notebook, on a 45k dataset size and reciving "Memory Error" without any further explanation.

When I try to run the same thing but with Naive-Bayes everything works fine, anyone has an idea?

S.Haviv
  • 311
  • 2
  • 14
  • "Memory Error" means just that, there was an error because your machine didn't have the memory to do the task or not enough memory is able to be allocated to the task. Are you using python 32bit or 64bit? I believe python 32bit might be limited to 1GB of RAM use. – enumaris Mar 26 '18 at 16:07
  • 64bit, 16 gb ram with gpu – S.Haviv Mar 26 '18 at 17:18
  • is there an alternate way to use SVM ? – S.Haviv Mar 26 '18 at 17:19
  • 1
    Might take a look at this older question: https://stackoverflow.com/questions/23056460/does-the-svm-in-sklearn-support-incremental-online-learning – enumaris Mar 26 '18 at 17:36

0 Answers0