Feature reference for the classifier gem. Every example here runs against the
version in this repository.
The README gives the short tour. These pages give the detail.
| Page |
Contents |
| classifier |
Train, classify, and manage models from the shell |
| keywords |
TF-IDF keyword extraction and term scores |
| Page |
Use it for |
| Bayes |
Fast probabilistic classification. The default choice |
| Logistic Regression |
Linear classification with calibrated probabilities |
| LSI |
Semantic similarity, search, related documents, and summaries |
| k-Nearest Neighbors |
Classification with the nearest examples and their votes |
| Page |
Contents |
| TF-IDF |
Term weights, n-grams, document frequency filters |
| Page |
Contents |
| Persistence |
Save, load, storage backends, and custom backends |
| Streaming |
Training on data larger than memory |
| Configuration |
Global settings and the native extension |
Start with Bayes. It trains in one pass, needs no fit step, and handles most
text classification tasks.
- Choose Logistic Regression when you need a probability per category, and
you accept a
fit step after training.
- Choose LSI when you need similarity, search, or related documents, and not
only a label.
- Choose k-Nearest Neighbors when you want to see which examples drove the
answer.
- Choose TF-IDF when you want term weights rather than a category.