# Fit-classifier-naive-bayes segmentation fault

**URL:** https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196
**Category:** Silva
**Tags:** feature-classifier, silva
**Created:** [October 28, 2019, 5:47pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196 "2019-10-28T17:47:33Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![jose\_gacia](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jose_gacia/32/6183_2.png) [@jose\_gacia](https://forum.qiime2.org/u/jose_gacia)
#### Post date: [October 28, 2019, 5:47pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/1 "2019-10-28T17:47:34Z")

</div>

Hi! It's my fisrt time using QIIME 2 and Im trying to train the the SILVA 16SV3-V4 classifier.  
I have already imported the secuences and the taxonomy, and extracted the reads. but when I try to train the classifier this error comes up

```
qiime feature-classifier fit-classifier-naive-bayes \
> --i-reference-reads ref-seqs-v34.qza \
> --i-reference-taxonomy 99_taxonomy.qza \
> --o-classifier silva132_v34_classifier.qza
**Segmentation fault (core dumped)**
(qiime2-2019.7)

```

Any ideas? Thanks in advance

---

<div class="post-metadata">

### Author: ![ben](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ben/32/1790_2.png) [@ben](https://forum.qiime2.org/u/ben)
#### Post date: [October 28, 2019, 5:54pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/2 "2019-10-28T17:54:56Z")

</div>

> [@jose\_gacia](#):
>
> **Segmentation fault (core dumped)** (qiime2-2019.7)

[https://forum.qiime2.org/t/feature-classifier-classify-sklearn-error-segmentation-fault-core-dumped/5140/2](https://forum.qiime2.org/t/feature-classifier-classify-sklearn-error-segmentation-fault-core-dumped/5140/2)

Hi Jose, this seems like a similar problem, can you tell us a little regarding how QIIME2 is set up? Thank you. Ben

---

<div class="post-metadata">

### Author: ![jose\_gacia](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jose_gacia/32/6183_2.png) [@jose\_gacia](https://forum.qiime2.org/u/jose_gacia)
#### Post date: [October 28, 2019, 6:00pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/3 "2019-10-28T18:00:40Z")

</div>

Im using a conda environment in Windows ubuntu, If that what you're asking

---

<div class="post-metadata">

### Author: ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)
#### Post date: [October 29, 2019, 5:57am UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/4 "2019-10-29T05:57:35Z")

</div>

Hi! I got this error when I run out of free space for temporary files. Clean your drive from temporal files and run again

---

<div class="post-metadata">

### Author: ![jose\_gacia](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jose_gacia/32/6183_2.png) [@jose\_gacia](https://forum.qiime2.org/u/jose_gacia)
#### Post date: [November 8, 2019, 11:25am UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/5 "2019-11-08T11:25:30Z")

</div>

Hi timanix thanks for your answer, I tried again with a 32G of RAM computer and I obtained the following error message

> qiime feature-classifier fit-classifier-naive-bayes  
> --i-reference-reads ref-seqs-v34.qza  
> --i-reference-taxonomy 99\_taxonomy.qza  
> --o-classifier silva132\_v34\_classifier.qza

> Plugin error from feature-classifier:
> 
> Unable to allocate array with shape (75003, 8192) and data type float64
> 
> Debug info has been saved to /tmp/qiime2-q2cli-err-dzqear5e.log  
> (qiime2-2019.7)

Any ideas on how to solve this? Thanks in advance

---

<div class="post-metadata">

### Author: ![dwt](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/d/71e660/32.png) [@dwt](https://forum.qiime2.org/u/dwt)
#### Post date: [November 8, 2019, 3:03pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/6 "2019-11-08T15:03:29Z")

</div>

Is the Ubuntu 32 bit or 64 bit Looks like it is trying to allocate a 2+ GB array so it might be running out of address space if the VM is 32 bit?

---

<div class="post-metadata">

### Author: ![jose\_gacia](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jose_gacia/32/6183_2.png) [@jose\_gacia](https://forum.qiime2.org/u/jose_gacia)
#### Post date: [November 8, 2019, 5:21pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/7 "2019-11-08T17:21:17Z")

</div>

Seems like It's 64 bits

```
 uname -a
Linux horus 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

```

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [November 9, 2019, 11:02am UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/8 "2019-11-09T11:02:15Z")

</div>

Both of the error messages you are reporting are essentially memory errors. 32GB RAM is usually enough for training a SILVA classifier, but appears to be insufficient on your system. You could try to kill any background processes that are sucking up much needed RAM, or find a more powerful machine for training this classifier. Though of course you could just use the pre-trained full-length SILVA classifier that is available on [qiime2.org](http://qiime2.org)

Good luck!

---

<div class="post-metadata">

### Author: ![jose\_gacia](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jose_gacia/32/6183_2.png) [@jose\_gacia](https://forum.qiime2.org/u/jose_gacia)
#### Post date: [November 9, 2019, 11:24am UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/9 "2019-11-09T11:24:23Z")

</div>

Thanks for your response Nicholas, I already used the pretrained classifier, I was just trying to train the classifier myself to see how the results would change, Do you know if the changes are usually significantly different?

Thanks in advance

---

<div class="post-metadata">

### Author: ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)
#### Post date: [November 9, 2019, 11:40am UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/10 "2019-11-09T11:40:42Z")

</div>

I used the classifier I trained and one that I downloaded from the forum and obtained almost identical results. It is better to use one that was trained or on the same primers pair (or region) as yours, or you can use classifier trained on the full sequences.

---

<div class="post-metadata">

### Author: ![jose\_gacia](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jose_gacia/32/6183_2.png) [@jose\_gacia](https://forum.qiime2.org/u/jose_gacia)
#### Post date: [November 9, 2019, 12:23pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/11 "2019-11-09T12:23:00Z")

</div>

Ok, I will try to find a more powerull computer, meanwhile I'll use the pretrained classifier, thanks to all of you!

---

<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: [December 10, 2019, 6:26pm UTC](https://forum.qiime2.org/t/fit-classifier-naive-bayes-segmentation-fault/12196/12 "2019-12-10T18:26:10Z")

</div>

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