Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

jurebes 🐾

Just-sklearn Utility for Reproducible Evaluation of Baselines, Estimators and Solvers.

A classical-ML text classification research framework, built on plain scikit-learn. It uses no NLTK and no padacioso.

Jurebes wires any sklearn featurizer to any sklearn classifier behind a small text-classification API. It also includes a registry of ready-to-use baselines, a benchmark harness, dataset loaders, a CLI, and an OVOS pipeline plugin.

Intent classification is the main use case, but the core works with any single-label text task. Spam, sentiment, topic, and language-ID tasks run on the same API. See the general text classification guide.

Named in memory of Jurebes, the best dog.

Install

pip install jurebes
# optional extras
pip install jurebes[hf]              # HuggingFace dataset loader
pip install jurebes[search-bayes]    # Bayesian hyperparameter search (skopt)
pip install jurebes[search-genetic]  # Genetic-algorithm search (sklearn-genetic-opt)
pip install jurebes[search-all]      # both bayes and genetic
pip install jurebes[bench-plot]      # matplotlib-based comparison plots
pip install jurebes[test]            # pytest stack

Quickstart

from jurebes import IntentClassifier, BASELINES

clf = IntentClassifier(BASELINES.build("logreg"))
clf.add_intent("hello", ["hello", "hi", "hey there"])
clf.add_intent("joke",  ["tell me a joke", "say a joke", "make me laugh"])
clf.fit()

result = clf.predict("hi there")
print(result.intent, result.confidence, result.entities)

Pass any sklearn Pipeline or estimator instead of a baseline name. Jurebes wraps non-probabilistic estimators with CalibratedClassifierCV automatically, so predict_proba always works.

Documentation

Full documentation lives under docs/:

  • Getting started: install, first classifier, core concepts, troubleshooting.
  • Guides: choosing a baseline, slots, calibration, reproducibility, debugging.
  • Theory: classical-ML foundations: featurization, linear models, kernels, ensembles, statistical comparison.
  • API reference: every public module, function, dataclass, and CLI flag.

Research

Jurebes is built as a research framework:

  • 48 named baselines tagged into groups (linear, kernel, tree, naive_bayes, neural, reduced_dim, online, strategy, feature_engineering, ensemble, discriminant, categorical). This includes neural-bottleneck autoencoder pipelines (autoencoder_*) and dict-input categorical pipelines (categorical_*).
  • A hyperparameter search subsystem (jurebes.search) with grid, random, successive-halving, Bayesian (optional), and genetic (optional) backends.
  • A benchmark harness with multi-metric scoring (f1_macro, accuracy, log_loss, top_k_accuracy, ...) and pooled tail-latency percentiles.
  • See docs/research.md and docs/search.md.

Baselines

BASELINES is a registry of 48 named factories. It covers naive Bayes, logistic regression, linear/RBF SVMs, kNN, online learners (SGD, perceptron, passive-aggressive, ridge), tree ensembles (random forest, extra trees, gradient boosting, HistGBM, bagging), a shallow MLP, voting, stacking, reduced-dim methods (LSA/NMF/LDA/autoencoder), multi-class strategy wrappers (OvR/OvO), discriminant analysis, text-statistics composites, and dict-input categorical pipelines. List them:

jurebes list-baselines

Registry table

group baseline
linear hashing_sgd_hinge
linear hashing_sgd_log
linear linear_svc
linear linear_svc_char
linear linear_svc_hinge
linear logreg
linear logreg_char
linear logreg_elasticnet
linear logreg_l1
linear passive_aggressive
linear perceptron
linear ridge
linear sgd_hinge
linear sgd_log
linear sgd_modified_huber
kernel knn
kernel lsa_rbf_svc
kernel nusvc
kernel rbf_svc
tree bagging_logreg
tree decision_tree
tree extra_trees
tree gradient_boosting
tree hist_gbm
tree random_forest
naive_bayes complement_nb_count
naive_bayes nb_bernoulli
naive_bayes nb_complement
naive_bayes nb_multinomial
neural mlp_shallow
reduced_dim lda_logreg
reduced_dim lsa_linear_svc
reduced_dim lsa_logreg
reduced_dim lsa_rbf_svc
reduced_dim nmf_logreg
online hashing_sgd_hinge
online hashing_sgd_log
online sgd_hinge
online sgd_log
online sgd_modified_huber
strategy ovo_linear_svc
strategy ovr_linear_svc
feature_engineering text_stats_logreg
feature_engineering union_text_stats_logreg
ensemble bagging_logreg
ensemble stacking
ensemble union_logreg
ensemble voting_soft
reduced_dim autoencoder_linear_svc
reduced_dim autoencoder_logreg
reduced_dim autoencoder_rbf_svc
discriminant lda_classifier
discriminant qda_classifier
categorical categorical_logreg
categorical categorical_random_forest

Rows total more than 48 because some baselines (for example bagging_logreg, sgd_log, hashing_sgd_hinge) belong to multiple groups. The registry itself holds 48 unique factories.

The categorical_* pipelines accept list[dict[str, str]] instead of raw text. They are available through the programmatic API only, and text-fixture benchmarks skip them.

Register your own:

from jurebes import BASELINES
BASELINES.register("my_pipeline", lambda: build_my_sklearn_pipeline())

Benchmark

jurebes benchmark --dataset data.csv \
    --baselines logreg,nb_multinomial,linear_svc --cv 5 \
    --out report.md

Or programmatically:

from jurebes.benchmark import compare, to_markdown
from jurebes.datasets import load_csv

X, y = load_csv("data.csv")
result = compare(["logreg", "linear_svc", "nb_multinomial"], X, y, k=5)
print(to_markdown(result))

RunResult captures accuracy, macro/micro F1, per-class F1, training time, predict-latency p50/p95/p99, model size, and the confusion matrix.

Slots

Five pluggable taggers cover dictionary, template, sklearn IOB, hybrid cascade, and CRF (optional extra). All are available through the TAGGERS registry and share the same protocol.

from jurebes import IntentClassifier, BASELINES
from jurebes.slots import TAGGERS, SklearnIOBTagger

clf = IntentClassifier(BASELINES.build("logreg"), tagger=SklearnIOBTagger())
# or by name:
clf = IntentClassifier(BASELINES.build("logreg"), tagger="hybrid")

clf.add_entity("name", ["bob", "alice"])
clf.add_intent("name", ["my name is {name}", "call me {name}"])
clf.add_intent("hello", ["hello", "hi"])
clf.fit()
clf.predict("my name is bob").entities  # -> {"name": "bob"}

TAGGERS.names()  # ['dictionary', 'template', 'sklearn_iob', 'hybrid', 'crf']

See docs/ for the research guide, slot tagger details, and the OVOS deployment notes:

Examples

Runnable, cell-marked scripts live in examples/notebooks/:

Both examples need pip install jurebes[hf,bench-plot].

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jurebes-0.4.1a1.tar.gz (94.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jurebes-0.4.1a1-py3-none-any.whl (91.0 kB view details)

Uploaded Python 3

File details

Details for the file jurebes-0.4.1a1.tar.gz.

File metadata

  • Download URL: jurebes-0.4.1a1.tar.gz
  • Upload date:
  • Size: 94.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jurebes-0.4.1a1.tar.gz
Algorithm Hash digest
SHA256 07c1ecf70bdd2b53fe264d88aa037d0ae6ca966f07664b5de948661212bdd0f8
MD5 0bd06fb9cd865e7cb147865e2244c08d
BLAKE2b-256 bdca809327fa0d288eb929f03235e7a88764cdf21bb899708f7b18c2347b1b85

See more details on using hashes here.

File details

Details for the file jurebes-0.4.1a1-py3-none-any.whl.

File metadata

  • Download URL: jurebes-0.4.1a1-py3-none-any.whl
  • Upload date:
  • Size: 91.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jurebes-0.4.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb7dd5206775927fa084173d4ca6e2b3dfc12d9bfa3e4c2fff09010da9065554
MD5 fed00e1b969de90cc581fe21604dd4af
BLAKE2b-256 84366a60405f1f125e4994a548b5d85798c1d8a6187777e5b2e0f305167ae654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page