The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Implements the Threshold-Based Naive Bayes (Tb-NB) classifier and its iterative refinement (iTb-NB) for binary sentiment / text classification problems. The classifier computes a continuous log-likelihood ratio score per document and uses a data-driven decision threshold estimated via K-fold cross-validation on a user-selected criterion (accuracy, F1 score, Matthews correlation coefficient, balanced error, etc.). An optional iterative refinement procedure locally re-estimates the threshold in regions of class overlap using either Gaussian kernel density estimation or a Central Limit Theorem bootstrap approximation. The package exposes an idiomatic R formula + data.frame interface together with a 'quanteda'-based text preprocessing pipeline, supports user-supplied document-feature matrices, and includes an optional word-embedding extension that augments the Bag-of-Words with K nearest semantic neighbours of each token. The package additionally implements the p-value extension proposed by Romano (2025) for both document- and feature-level interpretability via tbnb_pvalues(). Methods are described in Romano, Contu, Mola, Conversano (2024) <doi:10.1007/s11634-023-00536-8>, Romano, Zammarchi, Conversano (2024) <doi:10.1007/s10260-023-00721-1>, and Romano (2025) <doi:10.1007/978-3-031-96736-8_41>.
| Version: | 0.1.0 |
| Depends: | R (≥ 4.0) |
| Imports: | Matrix, methods, stats, grDevices, graphics, quanteda (≥ 3.0.0) |
| Suggests: | text2vec, stopwords, SnowballC, cld2, cld3, dbscan, viridisLite, testthat (≥ 3.0.0), ggplot2 |
| Published: | 2026-07-21 |
| DOI: | 10.32614/CRAN.package.tbnb (may not be active yet) |
| Author: | Maurizio Romano [aut, cre] |
| Maintainer: | Maurizio Romano <romano.maurizio at unica.it> |
| License: | GPL (≥ 3) |
| NeedsCompilation: | no |
| Language: | en-GB |
| Materials: | README, NEWS |
| CRAN checks: | tbnb results |
| Reference manual: | tbnb.html , tbnb.pdf |
| Vignettes: |
Introduction to tbnb (source, R code) |
| Package source: | tbnb_0.1.0.tar.gz |
| Windows binaries: | r-devel: not available, r-release: not available, r-oldrel: not available |
| macOS binaries: | r-release (arm64): tbnb_0.1.0.tgz, r-oldrel (arm64): tbnb_0.1.0.tgz, r-release (x86_64): tbnb_0.1.0.tgz, r-oldrel (x86_64): tbnb_0.1.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=tbnb to link to this page.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.