# Building a database in order to train a classifier

**URL:** https://forum.qiime2.org/t/building-a-database-in-order-to-train-a-classifier/15064
**Category:** General Discussion
**Created:** [May 22, 2020, 9:30pm UTC](https://forum.qiime2.org/t/building-a-database-in-order-to-train-a-classifier/15064 "2020-05-22T21:30:06Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [May 29, 2020, 5:24pm UTC](https://forum.qiime2.org/t/building-a-database-in-order-to-train-a-classifier/15064/2 "2020-05-29T17:24:10Z")

</div>

Welcome @bugsinbugs!

I am not sure I have a real answer to your question but here's my advice:

> [@bugsinbugs](#):
>
> Should I use a bunch of highly similar (\>99% sequences) for within each of the expected species?

Yes. If that's the amount of similarity you expect and the degree of resolution you are interested in, get as much differentiation as possible.

> [@bugsinbugs](#):
>
> what about outgroups since there may be stuff in there I can’t account for?

If you are not interested in fully profiling those outgroups, I recommend putting in some of those sequences but maybe not all representatives. For example, for fungal ITS classification it can be a good idea to throw in a few plant ITS sequences as outgroups (plant ITS seqs are amplified by most fungal ITS primers but most people using those primers only care about the fungi). Any plant ITS will be classified as belonging to those seqs, even if it is not the correct plant species — but since any plant hits are thrown away, that level of specificity is not important.

> [@bugsinbugs](#):
>
> Are there disadvantages to having this kind of discontinuous similarity in the database?

I think not, as long as you are documenting and accounting for those caveats in your analysis (e.g., you expect good results on the well-covered clades, but you should always throw out anything classified to the outgroups).

But ultimately you should thoroughly validate this using appropriate test data!

Good luck!

---

_[View the full topic](https://forum.qiime2.org/t/building-a-database-in-order-to-train-a-classifier/15064)._
