0

Please provide me your insights to resolve the below issue.

Error Details

Application Name : SCPortal
Minimum data per functionality : 25
Input File Name: /Users/Document/Desktop/PythonSpace/SC_Portal_Training_8thSep22.csv
Output file path: /Users/Document/Desktop/PythonSpace
Number of documents before filter: 0
Number of documents after filter: 0
SVC(C=100, gamma=0.001, probability=True)
Traceback (most recent call last):
  File "machine_learning_oriflame_functionality_with_whole_data.py", line 403, in <module>
    trainModel(inputFilePath, inputFileName, outputFilePath, applicationName, functionalityFieldName, cleanDataFieldName,minDataPerFunctionality)
  File "machine_learning_oriflame_functionality_with_whole_data.py", line 232, in trainModel
    svm_detector = pipeline_svm.fit(msg_train, label_train)
  File "/Users/Document/opt/anaconda3/lib/python3.8/site-packages/sklearn/pipeline.py", line 378, in fit
    Xt = self._fit(X, y, **fit_params_steps)
  File "/Users/Document/opt/anaconda3/lib/python3.8/site-packages/sklearn/pipeline.py", line 336, in _fit
    X, fitted_transformer = fit_transform_one_cached(
  File "/Users/Document/opt/anaconda3/lib/python3.8/site-packages/joblib/memory.py", line 349, in __call__
    return self.func(*args, **kwargs)
  File "/Users/Document/opt/anaconda3/lib/python3.8/site-packages/sklearn/pipeline.py", line 870, in _fit_transform_one
    res = transformer.fit_transform(X, y, **fit_params)
  File "/Users/Document/opt/anaconda3/lib/python3.8/site-packages/sklearn/feature_extraction/text.py", line 2079, in fit_transform
    X = super().fit_transform(raw_documents)
  File "/Users/Document/opt/anaconda3/lib/python3.8/site-packages/sklearn/feature_extraction/text.py", line 1338, in fit_transform
    vocabulary, X = self._count_vocab(raw_documents, self.fixed_vocabulary_)
  File "/Users/Document/opt/anaconda3/lib/python3.8/site-packages/sklearn/feature_extraction/text.py", line 1228, in _count_vocab
    raise ValueError(
ValueError: empty vocabulary; perhaps the documents only contain stop words
Progman
  • 16,827
  • 6
  • 33
  • 48
  • Please provide us with more information about the context in which this error happened. – Ignatius Reilly Sep 10 '22 at 13:49
  • Also, explain what happened when you tried [the other proposed solutions](https://duckduckgo.com/?q=ValueError%3A+empty+vocabulary%3B+perhaps+the+documents+only+contain+stop+words), or why they can't be applied apply to your particular case. – Ignatius Reilly Sep 10 '22 at 13:51
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 11 '22 at 10:54

0 Answers0