or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/scikit-learn@1.7.x
tile.json

tessl/pypi-scikit-learn

tessl install tessl/pypi-scikit-learn@1.7.0

A 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%

task.mdevals/scenario-6/

Streaming Classifier

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.

Capabilities

Incremental batch training

  • Processes an initial labeled batch to establish the supported classes so later batches with the same labels do not fail. @test
  • Applying a second labeled batch accumulates knowledge instead of resetting; accuracy on an easy validation set improves or stays at least as good as after the first batch (expected >=0.85 on a separable toy dataset). @test

Resumable epochs

  • Running a resume-style training call for extra epochs on previously seen data starts from the current model state (not from scratch) and yields higher validation accuracy than before the resume call. @test

Predictions and scoring

  • Predicting after incremental updates returns labels drawn from the provided class list; scoring returns the fraction of correct predictions on a provided evaluation set. @test

Implementation

@generates

API

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.
        """
        ...

Dependencies { .dependencies }

scikit-learn { .dependency }

Provides incremental-learning estimators and utilities for streaming classification.