Apply one online Perceptron update. Returns True if model exists.
(features: dict[str, float], correct_tier: str)
| 95 | |
| 96 | |
| 97 | def update_model(features: dict[str, float], correct_tier: str) -> bool: |
| 98 | """Apply one online Perceptron update. Returns True if model exists.""" |
| 99 | _ensure_model_loaded() |
| 100 | if _model is None: |
| 101 | return False |
| 102 | _model.update(features, correct_tier) |
| 103 | return True |
| 104 | |
| 105 | |
| 106 | def save_online_model(path: Path | None = None) -> None: |