# Error using Naive Bayes classifiers trained on Silva 132 99% OTUs full-length sequences

**URL:** https://forum.qiime2.org/t/error-using-naive-bayes-classifiers-trained-on-silva-132-99-otus-full-length-sequences/6634
**Category:** User Support
**Created:** [October 26, 2018, 1:05am UTC](https://forum.qiime2.org/t/error-using-naive-bayes-classifiers-trained-on-silva-132-99-otus-full-length-sequences/6634 "2018-10-26T01:05:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Tichy](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@Daniel\_Tichy](https://forum.qiime2.org/u/Daniel_Tichy)
#### Post date: [October 26, 2018, 1:05am UTC](https://forum.qiime2.org/t/error-using-naive-bayes-classifiers-trained-on-silva-132-99-otus-full-length-sequences/6634/1 "2018-10-26T01:05:23Z")

</div>

Hi, I have to thank the developers of this software, It has been really helpful, but I have this problem trying to do a Taxonomy classification and taxonomic analyses using the Naive Bayes classifiers trained on Silva 132 99% OTUs full-length sequences.

I tried this command line  
qiime feature-classifier classify-sklearn   
--i-classifier silva-132-99-nb-classifier.qza   
--i-reads rep-seqs.qza   
--o-classification taxonomy2.qza

And this is the error located in the log file:

Traceback (most recent call last):  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py", line 274, in **call**  
results = action(\*\*arguments)  
File "", line 2, in classify\_sklearn  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 225, in bound\_callable  
spec.view\_type, recorder)  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/result.py", line 266, in \_view  
result = transformation(self.\_archiver.data\_dir)  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/core/transform.py", line 70, in transformation  
new\_view = transformer(view)  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/q2\_feature\_classifier/\_taxonomic\_classifier.py", line 72, in \_1  
pipeline = joblib.load(os.path.join(dirname, 'sklearn\_pipeline.pkl'))  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/numpy\_pickle.py", line 578, in load  
obj = \_unpickle(fobj, filename, mmap\_mode)  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/numpy\_pickle.py", line 508, in \_unpickle  
obj = unpickler.load()  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/pickle.py", line 1043, in load  
dispatchkey[0]  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/numpy\_pickle.py", line 341, in load\_build  
self.stack.append(array\_wrapper.read(self))  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/numpy\_pickle.py", line 184, in read  
array = self.read\_array(unpickler)  
File "/home/fagolab/anaconda2/envs/qiime2-2018.8/lib/python3.5/site-packages/sklearn/externals/joblib/numpy\_pickle.py", line 130, in read\_array  
array = unpickler.np.empty(count, dtype=self.dtype)  
MemoryError

I did not have this problem using the Naive Bayes classifiers trained on Greengenes 13\_8 99% OTUs from 515F/806R region of sequences.

Did I just run out of memory for this analysis? If that is the case I read in other topics that you can reduce the number of "jobs" or "reads per batch", Do you think that I can do this analysis with a computer with 4 Gb of RAM?  
Thank you in advance.

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [October 26, 2018, 1:18am UTC](https://forum.qiime2.org/t/error-using-naive-bayes-classifiers-trained-on-silva-132-99-otus-full-length-sequences/6634/2 "2018-10-26T01:18:40Z")

</div>

Welcome @Daniel_Tichy,

> [@Daniel\_Tichy](#):
>
> Did I just run out of memory for this analysis?

Yep!

> [@Daniel\_Tichy](#):
>
> If that is the case I read in other topics that you can reduce the number of “jobs” or “reads per batch”, Do you think that I can do this analysis with a computer with 4 Gb of RAM?

By default, this step runs only a single job (you have to ask for more if you want more), but you _can_ tune the reads-per-batch to something very low (like a few thousand, the default is 500k). Keep in mind that 4Gb just isn't very much to work with, so it could take a very long time (if you're able to do with without a MemoryError at all). Silva definitely requires more memory than Greengenes in general, so this is pretty typical to see 🙂

Hopefully that helps, good luck!

---

<div class="post-metadata">

### Author: ![Daniel\_Tichy](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@Daniel\_Tichy](https://forum.qiime2.org/u/Daniel_Tichy)
#### Post date: [October 26, 2018, 2:07am UTC](https://forum.qiime2.org/t/error-using-naive-bayes-classifiers-trained-on-silva-132-99-otus-full-length-sequences/6634/3 "2018-10-26T02:07:28Z")

</div>

Thanks Evan, Thats what I tought, time to ask for a better machine to my boss, I have to do like 200 of these analysis hahahaha.

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [November 26, 2018, 8:07am UTC](https://forum.qiime2.org/t/error-using-naive-bayes-classifiers-trained-on-silva-132-99-otus-full-length-sequences/6634/4 "2018-11-26T08:07:28Z")

</div>

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