Classifier error during training

Hope you are well. I have an error during the training of the classifier:

qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads ref_seqs.qza --i-reference-taxonomy silva132_99_ref_taxonomy.qza --o-classifier classifier.qza --verbose

/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_feature_classifier/classifier.py:101: UserWarning: The TaxonomicClassifier artifact that results from this method was trained using scikit-learn version 0.19.1. It cannot be used with other versions of scikit-learn. (While the classifier may complete successfully, the results will be unreliable.)
warnings.warn(warning, UserWarning)
Traceback (most recent call last):
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “”, line 2, in fit_classifier_naive_bayes
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 232, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 367, in callable_executor
output_views = self._callable(**view_args)
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_feature_classifier/classifier.py”, line 316, in generic_fitter
pipeline)
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_feature_classifier/_skl.py”, line 32, in fit_pipeline
pipeline.fit(X, y)
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/sklearn/pipeline.py”, line 250, in fit
self._final_estimator.fit(Xt, y, **fit_params)
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_feature_classifier/custom.py”, line 41, in fit
classes=classes)
File “/home/qiime2/miniconda/envs/qiime2-2018.6/lib/python3.5/site-packages/sklearn/naive_bayes.py”, line 522, in partial_fit
dtype=np.float64)
MemoryError

Plugin error from feature-classifier:

See above for debug info.

Regards
Kianoosh

Hi @kia2094,
See the last line of that error message:

You are running out of memory. See this topic for tips to solve this.

Good luck!

Thank you for the reply Nicholas. Much appreciate it.

The link you sent me is asking to put the memory to 20GB memory. Isnt that a super computer? My mac has 8GB RAM.

Regards

No, that is high but many modern desktop computers have RAM within that range. A HPC cluster would easily cover this, and purchasing an AWS instance would too.

Alternatively, use the greengenes classifiers, which are smaller and less memory-intensive.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.