A comprehensive machine learning library providing supervised and unsupervised learning algorithms with consistent APIs and extensive tools for data preprocessing, model evaluation, and deployment.
87
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.
Install with Tessl CLI
npx tessl i tessl/pypi-scikit-learndocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10