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-9/

Unified Estimator Workflow

A small workflow layer that demonstrates the shared training and inference contract across estimators that expose fit, predict, and transform. Entry points reuse the same train/eval argument order to keep behaviour straightforward.

Capabilities

Predictive fit

  • Training on features [[0.0], [1.0], [2.0], [3.0]] with labels [0, 0, 1, 1] and then evaluating on [[1.5], [2.5]] returns predictions [0, 1] in that order. @test

Transform fit

  • Fitting on features [[0.0], [2.0]] and then transforming [[0.0], [2.0]] yields column-wise zero mean and unit variance results close to [[-1.0], [1.0]]. @test

Combined workflow

  • Calling a single entrypoint that fits once on training features and labels, then returns both the prediction results for [[1.5], [2.5]] and transformed values for the same evaluation data in one call preserves ordering and shapes from the earlier cases. @test

Fit precondition

  • Calling prediction or transformation routines before fitting raises a clear error mentioning the missing fit step. @test

Implementation

@generates

API

from typing import Any, Iterable, List, Optional, Sequence, Tuple

class UnifiedWorkflow:
    def __init__(self, predictor: Any, transformer: Any):
        """
        predictor: an estimator exposing fit/train and predict-style inference.
        transformer: an estimator exposing fit-style training and transform-style conversion.
        """

    def fit(self, train_features: Sequence[Sequence[float]], train_labels: Optional[Sequence[Any]] = None) -> None:
        """
        Fits available components on the provided training data.
        """

    def predict(self, eval_features: Sequence[Sequence[float]]) -> List[Any]:
        """
        Runs inference using the fitted predictor on the provided evaluation features.
        """

    def transform(self, eval_features: Sequence[Sequence[float]]) -> List[List[float]]:
        """
        Runs feature conversion using the fitted transformer on the provided evaluation features.
        """

    def fit_predict(self, train_features: Sequence[Sequence[float]], train_labels: Sequence[Any], eval_features: Sequence[Sequence[float]]) -> List[Any]:
        """
        Fits the predictor on training data, then returns predictions for the evaluation data.
        """

    def fit_transform(self, train_features: Sequence[Sequence[float]], eval_features: Sequence[Sequence[float]]) -> List[List[float]]:
        """
        Fits the transformer on training data, then returns transformed values for the evaluation data.
        """

    def fit_predict_transform(
        self,
        train_features: Sequence[Sequence[float]],
        train_labels: Sequence[Any],
        eval_features: Sequence[Sequence[float]],
    ) -> Tuple[List[Any], List[List[float]]]:
        """
        Fits once, then returns both predictions and transformed evaluation features in a single call.
        """

Dependencies { .dependencies }

scikit-learn { .dependency }

Provides estimators that expose consistent fit, predict, and transform routines for both predictive models and feature transformers.