tessl install tessl/pypi-scikit-learn@1.7.0A comprehensive machine learning library providing supervised and unsupervised learning algorithms with consistent APIs and extensive tools for data preprocessing, model evaluation, and deployment.
Agent Success
Agent success rate when using this tile
87%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.99x
Baseline
Agent success rate without this tile
88%
Design a small module that performs streaming classification on numeric feature vectors, supporting mini-batch updates and the ability to continue training without losing learned weights.
@generates
from typing import Iterable, Sequence
class StreamingClassifier:
def __init__(self, classes: Sequence[str], *, batch_size: int = 64):
...
def partial_train(self, features: Sequence[Sequence[float]], labels: Sequence[str]) -> None:
"""
Incrementally update the model with one batch of feature rows and matching labels.
"""
...
def resume_training(self, features: Sequence[Sequence[float]], labels: Sequence[str], epochs: int = 1) -> None:
"""
Continue training for one or more additional passes over the provided data without reinitializing learned parameters.
"""
...
def predict(self, features: Sequence[Sequence[float]]) -> list[str]:
"""
Predict labels for feature rows using the current model state.
"""
...
def score(self, features: Sequence[Sequence[float]], labels: Sequence[str]) -> float:
"""
Return accuracy as the proportion of correct predictions on the given evaluation set.
"""
...Provides incremental-learning estimators and utilities for streaming classification.