Skip to main content

Suffix smoothing classifier v0.4.0: 1.8x faster, KN memory fix, model merging, and feature importance.

Project description

suffix-smoother

A high-performance, production-ready sequence classifier using recursive suffix smoothing.

Zero neural networks. Zero GPUs. Zero model files. Handles OOV via progressive backoff.


What's New in v0.4.0

  • Industrial Pruning: prune(min_count=k) for massive RAM savings (up to 93% reduction).
  • Auto-Calibration: fit_temperature() minimizes ECE/NLL for reliable confidence scores.
  • Diagnostics: calibration_curve() for binned reliability analysis.
  • Portability: to_json() and from_json() for cross-platform model persistence.

Core Philosophy: Efficient AI

Suffix Smoother is designed for industrial environments where memory, latency, and explainability matter more than parameter count. By utilizing recursive suffix backoff instead of deep learning, it achieves competitive accuracy on sequence tasks with linear training throughput and sub-microsecond inference on standard CPUs.


Documentation & Benchmarks


Install

pip install suffix-smoother

Quick Start (v0.4.0)

from suffix_smoother import SuffixSmoother, SuffixConfig

# 1. Train at Industrial Scale
model = SuffixSmoother(SuffixConfig(n_classes=10))
model.train(data) # list of (seq_tuple, label_int)

# 2. Optimize Reliability (v0.4.0)
model.fit_temperature(val_data)
curve = SuffixSmoother.calibration_curve(test_probs, test_labels)

# 3. Compress for Production (v0.4.0)
# Removes rare nodes (90% reduction on 1M+ samples)
model.prune(min_count=10)

# 4. Save Portably (v0.4.0)
model.to_json("production_model.json")

Performance (Industrial Benchmark)

Dataset Scale Throughput RAM (Pruned)
Synthetic 1.5M samples 100k/sec -89% nodes
Sentiment140 1.6M tweets 85k/sec 4MB (JSON)

License

MIT

Project details


Download files

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

Source Distribution

suffix_smoother-0.4.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

suffix_smoother-0.4.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file suffix_smoother-0.4.0.tar.gz.

File metadata

  • Download URL: suffix_smoother-0.4.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for suffix_smoother-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6dc2430a57c743ddf6f84d86f4ac7da769cc2ec789c1dce7908dafb1b2a6b6f8
MD5 24032ddc4177b672df9e7b700437c129
BLAKE2b-256 fb16d2c34e4015806ce3ff15d22d67cfa780830f8f76848bd9ad22373cbbc39c

See more details on using hashes here.

File details

Details for the file suffix_smoother-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for suffix_smoother-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb1702698ba7bd205b88640cfea4b5b6e038dff8ff989f77df27facf92e05570
MD5 f020d05ceea71cbc27b36c5f2c0f2639
BLAKE2b-256 872976c3a292ff0004e5a4cd7084026f54a54d9f3a1dd36706fa7a09241c9deb

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 Pingdom Monitoring Sentry Error logging StatusPage Status page