Ad

Adaptive-classifier – text classification with continuous learning

Hacker News

Adaptive-classifier – text classification with continuous learning

Hi HN! I've built a Python library that lets you create text classifiers that can continuously learn and adapt to new classes without retraining from scratch. What makes this different from typical text classifiers: - Dynamically add new classes at any time without full retraining - Combines neural networks with prototype learning for better few-shot performance - Uses Elastic Weight Consolidation to prevent catastrophic forgetting - Works with any HuggingFace transformer base model - Memory-efficient through prototype-based storage You can try it out in under a minute: pip install adaptive-classifier from adaptive_classifier import AdaptiveClassifier # Initialize with any HuggingFace model classifier = AdaptiveClassifier("bert-base-uncased") # Add initial examples texts = ["Great product!", "Terrible experience", "Average performance"] labels = ["positive", "negative", "neutral"] classifier.add_examples(texts, labels) # Make predictions print(classifier.predict("This is amazing!")) # [('positive', 0.85), ('neutral', 0.10), ('negative', 0.05)] # Add a completely new class later classifier.add_examples( ["Error 404", "System crashed"], ["technical", "technical"] ) The library came out of my work on building a model router for optillm where approaches and model types keep changing. Traditional classifiers require full retraining when adding new classes, which becomes impractical with large datasets. Source code: https://github.com/codelion/adaptive-classifier I'd love to hear your thoughts and feedback! Happy to answer any questions about the implementation details, use cases, or future plans.

Share card

Actual performance

5points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
89%89% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: model, new, code · Missing: mac, agents, macos
86%86% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: io · Missing: https docs, excited, just released
56%56% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
41%41% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: efficient · Missing: plus, platform, intuitive
38%38% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: training · Missing: arr, mrr, revenue
16%16% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Co
Continuous Fuzzing for Go75%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Continuous Fuzzing for Go

Hacker News1
Be
Bencher – Continuous Benchmarking71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Bencher – Continuous Benchmarking

Hacker News3
Sa
Sagefy – Open-content adaptive learning system35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sagefy – Open-content adaptive learning system

Hacker News3
Ad
Adaptive Geocodes – Truncatable Geocodes27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Adaptive Geocodes – Truncatable Geocodes

Hacker News3
Ad
Adaptive Placeholders30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Adaptive Placeholders

Hacker News9
Co
Continuous stacktrace sampling in production with djigger (Java)61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Continuous stacktrace sampling in production with djigger (Java)

Hacker News1
Un
Unisync, the programmer's continuous sync too68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Unisync, the programmer's continuous sync too

Hacker News2
Co
CodSpeed – Continuous Performance Measurement74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CodSpeed – Continuous Performance Measurement

Hacker News32
Fl
Fluxsort, a stable Quicksort, faster and more adaptive than Timsort37%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fluxsort, a stable Quicksort, faster and more adaptive than Timsort

Hacker News4
Re
Regulo – an adaptive semaphore for saturation control43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Regulo – an adaptive semaphore for saturation control

Hacker News2