File size: 1,314 Bytes
9de9450
 
e596b75
9de9450
 
 
 
e596b75
9de9450
 
e402da9
 
 
 
99d67bf
e402da9
99d67bf
e402da9
99d67bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e402da9
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: README
emoji: πŸ“š
colorFrom: blue
colorTo: purple
sdk: static
pinned: false
license: apache-2.0
---

# Adaptive Classifier

A flexible, adaptive classification system that allows for dynamic addition of new classes and continuous learning from examples. Built on top of transformers from HuggingFace, this library provides an easy-to-use interface for creating and updating text classifiers.

## Usage

```python
pip install adaptive-classifier

from adaptive_classifier import AdaptiveClassifier
# Load from Hub
classifier = AdaptiveClassifier.from_pretrained("adaptive-classifier/model-name")
# Add some examples
texts = [
    "The product works great!",
    "Terrible experience",
    "Neutral about this purchase"
]
labels = ["positive", "negative", "neutral"]

classifier.add_examples(texts, labels)

# Make predictions
predictions = classifier.predict("This is amazing!")
print(predictions)  # [('positive', 0.85), ('neutral', 0.12), ('negative', 0.03)]
```

## How It Works

The system combines three key components:

1. **Transformer Embeddings**: Uses state-of-the-art language models for text representation

2. **Prototype Memory**: Maintains class prototypes for quick adaptation to new examples

3. **Adaptive Neural Layer**: Learns refined decision boundaries through continuous training